func (db *DB) NewWriteBatch() *WriteBatch { wb := &WriteBatch{ db: db, wbatch: C.leveldb_writebatch_create(), } return wb }
func newWriteBatch(db *DB) *WriteBatch { w := new(WriteBatch) w.db = db w.wbatch = C.leveldb_writebatch_create() w.gbatch = new(leveldb.Batch) return w }
func (db *DB) NewWriteBatch() driver.IWriteBatch { wb := &WriteBatch{ db: db, wbatch: C.leveldb_writebatch_create(), } runtime.SetFinalizer(wb, func(w *WriteBatch) { w.Close() }) return wb }
func New_writebatch() *Writebatch { wb := C.leveldb_writebatch_create() return &Writebatch{wb} }