func (w *WriteBatch) commit(wb *WriteOptions) error { var errStr *C.char C.leveldb_write(w.db.db, wb.Opt, w.wbatch, &errStr) if errStr != nil { return saveError(errStr) } return nil }
// Write atomically writes the *WriteBatch to disk. func (db *DB) Write(wo *WriteOptions, w *WriteBatch) error { var errStr *C.char C.leveldb_write(db.Ldb, wo.Opt, w.wbatch, &errStr) if errStr != nil { return DatabaseError(C.GoString(errStr)) } return nil }
// Write atomically writes a WriteBatch to disk. func (db *DB) Write(wo *WriteOptions, w *WriteBatch) error { var errStr *C.char C.leveldb_write(db.Ldb, wo.Opt, w.wbatch, &errStr) if errStr != nil { gs := C.GoString(errStr) C.free(unsafe.Pointer(errStr)) return DatabaseError(gs) } return nil }
func (ldb *Db) Write(w_options *Writeoptions, batch *Writebatch) error { var db_err *C.char C.leveldb_write(ldb.ldb, w_options.options, batch.wb, &db_err) if db_err != nil { return ldb_error(C.GoString(db_err)) } return nil }