forked from mirror/go-sqlite3
Add AutoCommit
This commit is contained in:
parent
e6850435ff
commit
3abc26b4ef
|
@ -129,6 +129,10 @@ func (tx *SQLiteTx) Rollback() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *SQLiteConn) AutoCommit() bool {
|
||||||
|
return int(C.sqlite3_get_autocommit()) != 0
|
||||||
|
}
|
||||||
|
|
||||||
func (c *SQLiteConn) exec(cmd string) error {
|
func (c *SQLiteConn) exec(cmd string) error {
|
||||||
pcmd := C.CString(cmd)
|
pcmd := C.CString(cmd)
|
||||||
defer C.free(unsafe.Pointer(pcmd))
|
defer C.free(unsafe.Pointer(pcmd))
|
||||||
|
|
Loading…
Reference in New Issue