Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnableRangeQuery ¶
func EnableRangeQuery() func(*TxIndex)
EnableRangeQuery is an option for enable range query.
func IndexAllTags ¶ added in v0.13.0
func IndexAllTags() func(*TxIndex)
IndexAllTags is an option for indexing all tags.
Types ¶
type TxIndex ¶
type TxIndex struct {
// contains filtered or unexported fields
}
TxIndex is the simplest possible indexer, backed by key-value storage (levelDB).
func NewTxIndex ¶
NewTxIndex creates new KV indexer.
func (*TxIndex) Get ¶
Get gets transaction from the TxIndex storage and returns it or nil if the transaction is not found.
func (*TxIndex) Index ¶ added in v0.13.0
Index indexes a single transaction using the given list of tags.
func (*TxIndex) Search ¶ added in v0.13.0
Search performs a search using the given query. It breaks the query into conditions (like "tx.height > 5"). For each condition, it queries the DB index. One special use cases here: (1) if "tx.hash" is found, it returns tx result for it (2) for range queries it is better for the client to provide both lower and upper bounds, so we are not performing a full scan. Results from querying indexes are then intersected and returned to the caller.