diff options
author | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-03-20 23:34:57 +0900 |
---|---|---|
committer | Yasuhiro Matsumoto <mattn.jp@gmail.com> | 2017-03-20 23:34:57 +0900 |
commit | 0acd8f7aece241ec47b8817481a15ed5d5d86ed7 (patch) | |
tree | 93c9863202467e4c0e6287e1c77c54388fc14afb | |
parent | fix build (diff) | |
download | golite-0acd8f7aece241ec47b8817481a15ed5d5d86ed7.tar.gz golite-0acd8f7aece241ec47b8817481a15ed5d5d86ed7.tar.xz |
fix build
-rw-r--r-- | sqlite3.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -298,7 +298,7 @@ func (ai *aggInfo) Done(ctx *C.sqlite3_context) { // Commit transaction. func (tx *SQLiteTx) Commit() error { _, err := tx.c.exec(context.Background(), "COMMIT", nil) - if err != nil && err.(Error).Code == C.SQLITE_BUSY { + if err != nil && err.(*Error).Code == C.SQLITE_BUSY { // sqlite3 will leave the transaction open in this scenario. // However, database/sql considers the transaction complete once we // return from Commit() - we must clean up to honour its semantics. @@ -519,7 +519,7 @@ func (c *SQLiteConn) begin(ctx context.Context) (driver.Tx, error) { return &SQLiteTx{c}, nil } -func errorString(err Error) string { +func errorString(err *Error) string { return C.GoString(C.sqlite3_errstr(C.int(err.Code))) } |