Interface InlineIndexKeyType

    • 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.TRUE if index key is null, Boolean.FALSE if index key is not null, null if 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:
        True if inlined value can be compared to index key.
      • keySize

        short keySize()
        Returns:
        Size of key, in bytes. -1 means 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:
        true if inline contains full index key. Can be false for truncated variable length types.