NewWriteBatch Init WriteBatch
(opt config.WriteBatchOptions)
| 25 | |
| 26 | // NewWriteBatch Init WriteBatch |
| 27 | func (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 |
| 37 | func (wb *WriteBatch) Put(key []byte, value []byte) error { |
no outgoing calls