Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interface ¶
type Interface interface { // CreateState function is used to create a new state in the state db // It must be called via the Interface returned by NewiState function // It takes chaincode stub and the actual structure value as input params // Note: This function does not do state validations such as, checking whether state exists or not // before performing the operation CreateState(shim.ChaincodeStubInterface, interface{}) Error // ReadState function is used to read a state from state db // It must be called via the Interface returned by NewiState function // It takes chaincode stub and value of primary key as input params // It returns the actual structure value as an interface{}. The returned value can // be type asserted to the actual struct type before using // Note: This function does not do state validations such as, checking whether state exists or not // before performing the operation ReadState(shim.ChaincodeStubInterface, interface{}) (interface{}, Error) // UpdateState function is used to update a state from statedb // It must be called via the Interface returned by NewiState function // It takes chaincode stub and the actual structure value as input params // Note: This function does not do state validations such as, checking whether state exists or not // before performing the operation UpdateState(shim.ChaincodeStubInterface, interface{}) Error // DeleteState function is used to delete a state from state db // It must be called via the Interface returned by NewiState function // It takes chaincode stub and value of primary key as input params // Note: This function does not do state validations such as, checking whether state exists or not // before performing the operation DeleteState(shim.ChaincodeStubInterface, interface{}) Error // Query function is used to perform Rich Queries over a state type in state db // It must be called via the Interface returned by NewiState function // It takes stub, query string and isInvoke (bool) flag as input params // isInvoke is set true, if this func is called in an invoke transaction // It returns slice of actual structure values as an interface{}. The returned value can // be type asserted to the actual slice of struct type before using // Learn more about the Rich query language formats in README.md Query(shim.ChaincodeStubInterface, string, bool) (interface{}, Error) }
type Options ¶
Options is an input parameter for NewiState function. CacheSize determines the max no. of records allowed in memory. DefaultCompactionSize determines how many index records to compact at one go. Since Compaction process takes lot of time, it is useful to set a batchsize and Compaction can be run multiple times, where each time, n records gets compacted.
Source Files ¶
- doc.go
- error.go
- istate-cache.go
- istate-cmplx-parser.go
- istate-consts.go
- istate-functions.go
- istate-general-utils.go
- istate-index-utils.go
- istate-interface.go
- istate-meta-funcs.go
- istate-query-db-fetchers-star.go
- istate-query-db-fetchers.go
- istate-query-evaluators.go
- istate-query-logic-operators.go
- istate-query-utils.go
- istate-query.go
- istate-utils.go
- istate.go
Click to show internal directories.
Click to hide internal directories.