Documentation ¶
Index ¶
- func NewUpdateBatch() protocol.StoreBatcher
- type EngineType
- type HistoryIteratorImpl
- type SavePoint
- type SqlVerifyPass
- type StandardSqlVerify
- type TxHistoryIteratorImpl
- type UpdateBatch
- func (batch *UpdateBatch) Delete(key []byte)
- func (batch *UpdateBatch) Get(key []byte) ([]byte, error)
- func (batch *UpdateBatch) Has(key []byte) bool
- func (batch *UpdateBatch) KVs() map[string][]byte
- func (batch *UpdateBatch) Len() int
- func (batch *UpdateBatch) Merge(u protocol.StoreBatcher)
- func (batch *UpdateBatch) Put(key []byte, value []byte)
- func (batch *UpdateBatch) SplitBatch(batchCnt uint64) []protocol.StoreBatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUpdateBatch ¶
func NewUpdateBatch() protocol.StoreBatcher
NewUpdateBatch constructs an instance of a Batch
Types ¶
type EngineType ¶
type EngineType int32
EngineType database type
const ( UnknownDb EngineType = 0 LevelDb EngineType = 1 TikvDb EngineType = 2 MySQL EngineType = 3 Sqlite EngineType = 4 BadgerDb EngineType = 5 )
nolint
func (EngineType) LowerString ¶
func (t EngineType) LowerString() string
func (EngineType) String ¶
func (t EngineType) String() string
type HistoryIteratorImpl ¶
type HistoryIteratorImpl struct {
// contains filtered or unexported fields
}
func NewHistoryIterator ¶
func NewHistoryIterator(contractName string, key []byte, dbItr historydb.HistoryIterator, resultStore resultdb.ResultDB, blockStore blockdb.BlockDB) *HistoryIteratorImpl
func (*HistoryIteratorImpl) Next ¶
func (hs *HistoryIteratorImpl) Next() bool
func (*HistoryIteratorImpl) Release ¶
func (hs *HistoryIteratorImpl) Release()
func (*HistoryIteratorImpl) Value ¶
func (hs *HistoryIteratorImpl) Value() (*storePb.KeyModification, error)
type SqlVerifyPass ¶
type SqlVerifyPass struct { }
SqlVerifyPass 用于测试场景,不对SQL语句进行检查,任意SQL检查都通过
func (*SqlVerifyPass) VerifyDDLSql ¶
func (s *SqlVerifyPass) VerifyDDLSql(sql string) error
func (*SqlVerifyPass) VerifyDMLSql ¶
func (s *SqlVerifyPass) VerifyDMLSql(sql string) error
func (*SqlVerifyPass) VerifyDQLSql ¶
func (s *SqlVerifyPass) VerifyDQLSql(sql string) error
type StandardSqlVerify ¶
type StandardSqlVerify struct { }
StandardSqlVerify 如果状态数据库是标准SQL语句,对标准SQL的SQL语句进行语法检查,不关心具体的SQL DB类型的语法差异
func (*StandardSqlVerify) VerifyDDLSql ¶
func (s *StandardSqlVerify) VerifyDDLSql(sql string) error
func (*StandardSqlVerify) VerifyDMLSql ¶
func (s *StandardSqlVerify) VerifyDMLSql(sql string) error
func (*StandardSqlVerify) VerifyDQLSql ¶
func (s *StandardSqlVerify) VerifyDQLSql(sql string) error
type TxHistoryIteratorImpl ¶
type TxHistoryIteratorImpl struct {
// contains filtered or unexported fields
}
func NewTxHistoryIterator ¶
func NewTxHistoryIterator(dbItr historydb.HistoryIterator, blockStore blockdb.BlockDB) *TxHistoryIteratorImpl
func (*TxHistoryIteratorImpl) Next ¶
func (hs *TxHistoryIteratorImpl) Next() bool
func (*TxHistoryIteratorImpl) Release ¶
func (hs *TxHistoryIteratorImpl) Release()
func (*TxHistoryIteratorImpl) Value ¶
func (hs *TxHistoryIteratorImpl) Value() (*storePb.TxHistory, error)
type UpdateBatch ¶
UpdateBatch encloses the details of multiple `updates`
func (*UpdateBatch) Delete ¶
func (batch *UpdateBatch) Delete(key []byte)
Delete deletes a Key and associated value
func (*UpdateBatch) Get ¶ added in v2.1.1
func (batch *UpdateBatch) Get(key []byte) ([]byte, error)
func (*UpdateBatch) Has ¶ added in v2.1.1
func (batch *UpdateBatch) Has(key []byte) bool
func (*UpdateBatch) Len ¶
func (batch *UpdateBatch) Len() int
Len returns the number of entries in the batch
func (*UpdateBatch) Merge ¶
func (batch *UpdateBatch) Merge(u protocol.StoreBatcher)
Merge merges other kvs to this updateBatch
func (*UpdateBatch) SplitBatch ¶
func (batch *UpdateBatch) SplitBatch(batchCnt uint64) []protocol.StoreBatcher
SplitBatch split other kvs to more updateBatchs division by batchCnt
Click to show internal directories.
Click to hide internal directories.