Documentation ¶
Index ¶
- type StateKvDB
- func (s *StateKvDB) BeginDbTransaction(txName string) (protocol.SqlDBTransaction, error)
- func (s *StateKvDB) Close()
- func (s *StateKvDB) CommitBlock(blockWithRWSet *serialization.BlockWithSerializedInfo, isCache bool) error
- func (s *StateKvDB) CommitDbTransaction(txName string) error
- func (s *StateKvDB) CreateDatabase(contractName string) error
- func (s *StateKvDB) DirectFlushDB(keyMap map[string][]byte) error
- func (s *StateKvDB) DropDatabase(contractName string) error
- func (s *StateKvDB) ExecDdlSql(contractName, sql, version string) error
- func (s *StateKvDB) GetChainConfig() (*configPb.ChainConfig, error)
- func (s *StateKvDB) GetContractDbName(contractName string) string
- func (s *StateKvDB) GetDbTransaction(txName string) (protocol.SqlDBTransaction, error)
- func (b *StateKvDB) GetLastSavepoint() (uint64, error)
- func (s *StateKvDB) GetMemberExtraData(member *accesscontrol.Member) (*accesscontrol.MemberExtraData, error)
- func (s *StateKvDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
- func (s *StateKvDB) QueryMulti(contractName, sql string, values ...interface{}) (protocol.SqlRows, error)
- func (s *StateKvDB) QuerySingle(contractName, sql string, values ...interface{}) (protocol.SqlRow, error)
- func (s *StateKvDB) ReadObject(contractName string, key []byte) ([]byte, error)
- func (s *StateKvDB) RollbackDbTransaction(txName string) error
- func (s *StateKvDB) SelectObject(contractName string, startKey []byte, limit []byte) (protocol.StateIterator, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StateKvDB ¶
StateKvDB provider a implementation of `statedb.StateDB` This implementation provides a key-value based data model
func NewStateKvDB ¶
func NewStateKvDB(chainId string, handle protocol.DBHandle, logger protocol.Logger, storeConfig *conf.StorageConfig) *StateKvDB
func (*StateKvDB) BeginDbTransaction ¶
func (*StateKvDB) CommitBlock ¶
func (s *StateKvDB) CommitBlock(blockWithRWSet *serialization.BlockWithSerializedInfo, isCache bool) error
CommitBlock commits the state in an atomic operation
func (*StateKvDB) CommitDbTransaction ¶
func (*StateKvDB) DirectFlushDB ¶ added in v2.2.0
flush keyMap data direct write to db, not write cache
func (*StateKvDB) DropDatabase ¶
DropDatabase 删除一个合约对应的数据库
func (*StateKvDB) ExecDdlSql ¶
func (*StateKvDB) GetChainConfig ¶
func (s *StateKvDB) GetChainConfig() (*configPb.ChainConfig, error)
func (*StateKvDB) GetContractDbName ¶
GetContractDbName 获得一个合约对应的状态数据库名
func (*StateKvDB) GetDbTransaction ¶
func (*StateKvDB) GetLastSavepoint ¶
GetLastSavepoint returns the last block height
func (*StateKvDB) GetMemberExtraData ¶
func (s *StateKvDB) GetMemberExtraData(member *accesscontrol.Member) (*accesscontrol.MemberExtraData, error)
func (*StateKvDB) InitGenesis ¶
func (s *StateKvDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error
func (*StateKvDB) QueryMulti ¶
func (*StateKvDB) QuerySingle ¶
func (*StateKvDB) ReadObject ¶
ReadObject returns the state value for given contract name and key, or returns nil if none exists.
func (*StateKvDB) RollbackDbTransaction ¶
func (*StateKvDB) SelectObject ¶
func (s *StateKvDB) SelectObject(contractName string, startKey []byte, limit []byte) (protocol.StateIterator, error)
SelectObject returns an iterator that contains all the key-values between given key ranges. startKey is included in the results and limit is excluded.
Click to show internal directories.
Click to hide internal directories.