MCPcopy Index your code
hub / github.com/ByteStorage/FlyDB / NewWriteBatch

Method NewWriteBatch

engine/batch.go:27–34  ·  view source on GitHub ↗

NewWriteBatch Init WriteBatch

(opt config.WriteBatchOptions)

Source from the content-addressed store, hash-verified

25
26// NewWriteBatch Init WriteBatch
27func (db *DB) NewWriteBatch(opt config.WriteBatchOptions) *WriteBatch {
28 return &WriteBatch{
29 options: opt,
30 lock: new(sync.Mutex),
31 db: db,
32 temporaryDataWrites: make(map[string]*data.LogRecord),
33 }
34}
35
36// Put Data batch write
37func (wb *WriteBatch) Put(key []byte, value []byte) error {

Callers 14

TestDB_WriteBatchFunction · 0.95
TestDB_WriteBatchRestartFunction · 0.95
TestDB_WriteBatch1Function · 0.95
StoreLogsMethod · 0.80
DeleteRangeMethod · 0.80
HSetMethod · 0.80
HDelMethod · 0.80
HDelAllMethod · 0.80
HExpireMethod · 0.80
HUpdateMethod · 0.80
HIncrByMethod · 0.80
HIncrByFloatMethod · 0.80

Calls

no outgoing calls

Tested by 3

TestDB_WriteBatchFunction · 0.76
TestDB_WriteBatchRestartFunction · 0.76
TestDB_WriteBatch1Function · 0.76