diff options
author | mattn <mattn.jp@gmail.com> | 2013-08-23 14:26:33 +0900 |
---|---|---|
committer | mattn <mattn.jp@gmail.com> | 2013-08-23 14:26:33 +0900 |
commit | ac279b69bf7c534516ca223de486fd15b273c3a2 (patch) | |
tree | 0c0444db2367a1fcf3897cd9f74bfdf481ca0e4d /sqlite3.go | |
parent | Add AutoCommit (diff) | |
download | golite-ac279b69bf7c534516ca223de486fd15b273c3a2.tar.gz golite-ac279b69bf7c534516ca223de486fd15b273c3a2.tar.xz |
Fixes typo
Diffstat (limited to 'sqlite3.go')
-rw-r--r-- | sqlite3.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -77,7 +77,7 @@ func init() { // Driver struct. type SQLiteDriver struct { - EnableLoadExtentions bool + EnableLoadExtension bool ConnectHook func(*SQLiteConn) } @@ -130,7 +130,7 @@ func (tx *SQLiteTx) Rollback() error { } func (c *SQLiteConn) AutoCommit() bool { - return int(C.sqlite3_get_autocommit()) != 0 + return int(C.sqlite3_get_autocommit(c.db)) != 0 } func (c *SQLiteConn) exec(cmd string) error { @@ -182,11 +182,11 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) { return nil, errors.New(C.GoString(C.sqlite3_errmsg(db))) } - enableLoadExtentions := 0 - if d.EnableLoadExtentions { - enableLoadExtentions = 1 + enableLoadExtension := 0 + if d.EnableLoadExtension { + enableLoadExtension = 1 } - rv = C.sqlite3_enable_load_extension(db, C.int(enableLoadExtentions)) + rv = C.sqlite3_enable_load_extension(db, C.int(enableLoadExtension)) if rv != C.SQLITE_OK { return nil, errors.New(C.GoString(C.sqlite3_errmsg(db))) } |