Documentation
¶
Overview ¶
Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
View Source
const ( Beginning = iota + 1 Existing Ending )
Variables ¶
This section is empty.
Functions ¶
func ConstructIndexEntries ¶
func ConstructIndexEntries(updates map[string]*worldstate.DBUpdates, db worldstate.DB) (map[string]*worldstate.DBUpdates, error)
ConstructIndexEntries constructs index entries for the supplied the world state updates
func EncodeInt64 ¶
EncodeInt64 encodes a given int64 value to a hexadecimal representation to preserve the order of actual value, i.e., -100 < -10 < 0 < 100 < 1000
func GetValue ¶
func GetValue(value interface{}, t types.IndexAttributeType) interface{}
GetValue returns the value used by the index creator and the associated metadata
Types ¶
type IndexEntry ¶
type IndexEntry struct { Attribute string `json:"a"` Type types.IndexAttributeType `json:"t"` ValuePosition int8 `json:"vp"` // ValuePosition is used such that range query for lesser than, greater than can be executed easily Value interface{} `json:"v"` KeyPosition int8 `json:"kp"` // KeyPosition is used such that range query for lesser than, greater than can be executed easily Key string `json:"k"` }
IndexEntry hold metadata associated with the attribute being indexed along with the attribute value and key
func (*IndexEntry) Load ¶
func (e *IndexEntry) Load(entry []byte) error
Load loads the string representation of IndexEntry into the IndexEntry object
func (*IndexEntry) String ¶
func (e *IndexEntry) String() (string, error)
String returns a string representation of the indexEntry
Click to show internal directories.
Click to hide internal directories.