Documentation ¶
Index ¶
- type QECombiner
- func (c *QECombiner) GetPrivateDataHash(namespace, collection, key string) ([]byte, error)
- func (c *QECombiner) GetState(namespace string, key string) ([]byte, error)
- func (c *QECombiner) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error)
- type QueryExecuter
- type UpdateBatchBackedQueryExecuter
- func (qe *UpdateBatchBackedQueryExecuter) GetPrivateDataHash(ns, coll, key string) (*statedb.VersionedValue, error)
- func (qe *UpdateBatchBackedQueryExecuter) GetState(ns, key string) (*statedb.VersionedValue, error)
- func (qe *UpdateBatchBackedQueryExecuter) GetStateRangeScanIterator(namespace, startKey, endKey string) (statedb.ResultsIterator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QECombiner ¶
type QECombiner struct {
QueryExecuters []QueryExecuter // actual executers in decending order of priority
}
QECombiner combines the query results from one or more underlying 'QueryExecuters' In case, the same key is returned by multiple 'QueryExecuters', the first 'QueryExecuter' in the input is considered having the latest state of the key
func (*QECombiner) GetPrivateDataHash ¶
func (c *QECombiner) GetPrivateDataHash(namespace, collection, key string) ([]byte, error)
GetPrivateDataHash returns the hashed value of a private data key from first QueryExecuter in the slice that contains the state of the hash of the key
func (*QECombiner) GetState ¶
func (c *QECombiner) GetState(namespace string, key string) ([]byte, error)
GetState returns the value of the key from first QueryExecuter in the slice that contains the state of the key
func (*QECombiner) GetStateRangeScanIterator ¶
func (c *QECombiner) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error)
GetStateRangeScanIterator returns an iterator that can be used to iterate over the range between startKey(inclusive) and endKey (exclusive). The results retuned are unioin of the results returned by the individual QueryExecuters in the global sort order of the key
type QueryExecuter ¶
type QueryExecuter interface { GetState(namespace, key string) (*statedb.VersionedValue, error) GetStateRangeScanIterator(namespace, startKey, endKey string) (statedb.ResultsIterator, error) GetPrivateDataHash(namespace, collection, key string) (*statedb.VersionedValue, error) }
QueryExecuter encapsulates query functions
type UpdateBatchBackedQueryExecuter ¶
type UpdateBatchBackedQueryExecuter struct { UpdateBatch *statedb.UpdateBatch HashUpdatesBatch *privacyenabledstate.HashedUpdateBatch }
UpdateBatchBackedQueryExecuter wraps an update batch for providing functions in the interface QueryExecuter
func (*UpdateBatchBackedQueryExecuter) GetPrivateDataHash ¶
func (qe *UpdateBatchBackedQueryExecuter) GetPrivateDataHash(ns, coll, key string) (*statedb.VersionedValue, error)
GetPrivateDataHash returns the hashed value assosicited with a private data key from the UpdateBatch
func (*UpdateBatchBackedQueryExecuter) GetState ¶
func (qe *UpdateBatchBackedQueryExecuter) GetState(ns, key string) (*statedb.VersionedValue, error)
GetState return the state of the in the UpdateBatch
func (*UpdateBatchBackedQueryExecuter) GetStateRangeScanIterator ¶
func (qe *UpdateBatchBackedQueryExecuter) GetStateRangeScanIterator(namespace, startKey, endKey string) (statedb.ResultsIterator, error)
GetStateRangeScanIterator returns an iterator to scan over the range of the keys present in the UpdateBatch