Interface InlineIndexKeyType
-
- All Known Implementing Classes:
BooleanInlineIndexKeyType,ByteInlineIndexKeyType,BytesInlineIndexKeyType,DateInlineIndexKeyType,DoubleInlineIndexKeyType,FloatInlineIndexKeyType,IntegerInlineIndexKeyType,LongInlineIndexKeyType,NullableInlineIndexKeyType,NumericInlineIndexKeyType,ObjectByteArrayInlineIndexKeyType,ObjectHashInlineIndexKeyType,ShortInlineIndexKeyType,SignedBytesInlineIndexKeyType,StringInlineIndexKeyType,StringNoCompareInlineIndexKeyType,TimeInlineIndexKeyType,TimestampInlineIndexKeyType,UuidInlineIndexKeyType
public interface InlineIndexKeyTypeBasic interface for inlined index columns. It's not a generic to provide opportunity compare different types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description intcompare(long pageAddr, int off, int maxSize, IndexKey v)Compares inlined and given value.@Nullable IndexKeyget(long pageAddr, int off, int maxSize)Gets index key from inline index tree.booleaninlinedFullValue(long pageAddr, int off, int maxSize)Whether inline contains full index key.intinlineSize()Returns size of inlined key.intinlineSize(long pageAddr, int off)Actual size of inline value.intinlineSize(IndexKey key)Returns inline size for specified key.default booleanisComparableTo(IndexKey key)@Nullable BooleanisNull(long pageAddr, int off, int maxSize)Checks if inlined index key is null.shortkeySize()intput(long pageAddr, int off, IndexKey key, int maxSize)Puts given value into inline index tree.IndexKeyTypetype()Returns type of inlined column.
-
-
-
Method Detail
-
type
IndexKeyType type()
Returns type of inlined column.- Returns:
- Column's value type.
-
inlineSize
int inlineSize()
Returns size of inlined key. Note: system fields (e.g. type, length) are taken into account as well.
-
inlineSize
int inlineSize(IndexKey key)
Returns inline size for specified key. Note: system fields (e.g. type, length) are taken into account as well.
-
inlineSize
int inlineSize(long pageAddr, int off)Actual size of inline value. It returns keySize() + 1 for values with fixed size and amount of written bytes for values with variable length. Used for dynamic offset calculation by page for variable length values.- Parameters:
pageAddr- Page address.off- Offset.- Returns:
- Returns actual size of inlined value.
-
put
int put(long pageAddr, int off, IndexKey key, int maxSize)Puts given value into inline index tree.- Parameters:
pageAddr- Page address.off- Offset.key- Index key.maxSize- Remaining inlined buffer size (max available bytes to write for the current row).- Returns:
- Amount of bytes actually stored.
-
get
@Nullable @Nullable IndexKey get(long pageAddr, int off, int maxSize)
Gets index key from inline index tree.- Parameters:
pageAddr- Page address.off- Offset.maxSize- Remaining inlined buffer size (max available bytes to read for the current row).- Returns:
- Index key extracted from index tree.
-
isNull
@Nullable @Nullable Boolean isNull(long pageAddr, int off, int maxSize)
Checks if inlined index key is null.- Parameters:
pageAddr- Page address.off- Offset.maxSize- Remaining inlined buffer size (max available bytes to read for the current row).- Returns:
Boolean.TRUEif index key is null,Boolean.FALSEif index key is not null,nullif can't say for sure.
-
compare
int compare(long pageAddr, int off, int maxSize, IndexKey v)Compares inlined and given value.- Parameters:
pageAddr- Page address.off- Offset.maxSize- Remaining inlined buffer size (max available bytes to read for the current row).v- Value that should be compare.- Returns:
- -1, 0 or 1 if inlined value less, equal or greater than given respectively, or -2 if inlined part is not enough to compare.
-
isComparableTo
default boolean isComparableTo(IndexKey key)
- Returns:
Trueif inlined value can be compared to index key.
-
keySize
short keySize()
- Returns:
- Size of key, in bytes.
-1means variable length of key.
-
inlinedFullValue
boolean inlinedFullValue(long pageAddr, int off, int maxSize)Whether inline contains full index key.- Parameters:
pageAddr- Page address.off- Offset.maxSize- Remaining inlined buffer size (max available bytes to read for the current row).- Returns:
trueif inline contains full index key. Can befalsefor truncated variable length types.
-
-