aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattn <mattn.jp@gmail.com>2013-05-11 21:45:48 +0900
committermattn <mattn.jp@gmail.com>2013-05-11 21:45:48 +0900
commitf1d58ee64a5eb6517dde6be1221747001f8a197b (patch)
tree0823bd87c35352e9c904391f0c405502d22fd0a1
parentthe SQLiteResult refers to the connection after it should no longer be referr... (diff)
downloadgolite-f1d58ee64a5eb6517dde6be1221747001f8a197b.tar.gz
golite-f1d58ee64a5eb6517dde6be1221747001f8a197b.tar.xz
go fmt
-rw-r--r--sqlite3.go4
-rw-r--r--sqlite3_test.go1
2 files changed, 2 insertions, 3 deletions
diff --git a/sqlite3.go b/sqlite3.go
index e9cb790..fa2d84a 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -99,7 +99,7 @@ type SQLiteStmt struct {
// Result struct.
type SQLiteResult struct {
- id int64
+ id int64
changes int64
}
@@ -313,7 +313,7 @@ func (s *SQLiteStmt) Exec(args []driver.Value) (driver.Result, error) {
if rv != C.SQLITE_ROW && rv != C.SQLITE_OK && rv != C.SQLITE_DONE {
return nil, errors.New(C.GoString(C.sqlite3_errmsg(s.c.db)))
}
-
+
res := &SQLiteResult{
int64(C._sqlite3_last_insert_rowid(s.c.db)),
int64(C._sqlite3_changes(s.c.db)),
diff --git a/sqlite3_test.go b/sqlite3_test.go
index 9bcc5f3..3ea5592 100644
--- a/sqlite3_test.go
+++ b/sqlite3_test.go
@@ -407,4 +407,3 @@ func TestBoolean(t *testing.T) {
t.Error("Expected error from \"nonsense\" bool")
}
}
-