diff options
author | mattn <mattn.jp@gmail.com> | 2013-08-23 14:11:15 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2013-08-23 14:11:15 +0900 |
commit | 3abc26b4efa9c4dcc7e4abd2f1bc2f1194ea4344 (patch) | |
tree | f888f82bc39a6bab656c1fe49436d0f4f23f75ba | |
parent | Possible to register custom driver (diff) | |
download | golite-3abc26b4efa9c4dcc7e4abd2f1bc2f1194ea4344.tar.gz golite-3abc26b4efa9c4dcc7e4abd2f1bc2f1194ea4344.tar.xz |
Add AutoCommit
-rw-r--r-- | sqlite3.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -129,6 +129,10 @@ func (tx *SQLiteTx) Rollback() error { return nil } +func (c *SQLiteConn) AutoCommit() bool { + return int(C.sqlite3_get_autocommit()) != 0 +} + func (c *SQLiteConn) exec(cmd string) error { pcmd := C.CString(cmd) defer C.free(unsafe.Pointer(pcmd)) |