Example #1
0
File: txn.go Project: Crest/gomdb
func (txn *Txn) Commit() error {
	ret := C.mdb_txn_commit(txn._txn)
	if ret != SUCCESS {
		return Errno(ret)
	}
	return nil
}
Example #2
0
File: txn.go Project: postfix/gomdb
func (txn *Txn) Commit() error {
	ret := C.mdb_txn_commit(txn._txn)
	runtime.UnlockOSThread()
	if ret != SUCCESS {
		return Errno(ret)
	}
	return nil
}
Example #3
0
func (txn *Txn) Commit() error {
	ret := C.mdb_txn_commit(txn.txn)
	// The transaction handle is freed if there was no error
	if ret == SUCCESS {
		txn.txn = nil
	}
	return errno(ret)
}
Example #4
0
func (txn *Txn) Commit() error {
	ret := C.mdb_txn_commit(txn._txn)
	runtime.UnlockOSThread()
	// The transaction handle is freed if there was no error
	if ret == C.MDB_SUCCESS {
		txn._txn = nil
	}
	return errno(ret)
}
Example #5
0
func (txn *Txn) Commit() error {
	if txn._txn == nil {
		return nil // already committed/aborted
	}
	ret := C.mdb_txn_commit(txn._txn)
	runtime.UnlockOSThread()
	if ret != SUCCESS {
		return errno(ret)
	}
	txn._txn = nil
	return nil
}
Example #6
0
File: txn.go Project: hyc/gomdb
func (txn *Txn) Commit() error {
	ret := C.mdb_txn_commit(txn._txn)
	runtime.UnlockOSThread()
	return errno(ret)
}
Example #7
0
func (txn *Txn) commit() error {
	ret := C.mdb_txn_commit(txn._txn)
	txn._txn = nil
	return operrno("mdb_txn_commit", ret)
}