Commit Graph

192 Commits

Author SHA1 Message Date
Jason Abbott 59bd281a89 Incorporate original PR 271 from https://github.com/brokensandals 2017-07-03 12:51:48 -06:00
deepilla 05123859be Don't convert Unix times to nanoseconds when querying datetime fields. Fixes #430. 2017-06-30 13:17:04 -05:00
Evgeniy Makeev ef9f773b24 Fix for cgo panic, issue #428: https://github.com/mattn/go-sqlite3/issues/428 2017-06-20 17:36:44 -07:00
Philip O'Toole cd1cbf523a Sync database-close and statement-close
Potential fix for issue #426.
2017-06-17 12:26:06 -07:00
Xu Xinran 3fa7ed2176 Use global variable for better performance. 2017-06-14 21:22:40 +08:00
Xu Xinran 308f5f1b2f Treat []byte{} as empty bytes instead of NULL. 2017-06-14 19:55:09 +08:00
mattn 46e826d22a Merge pull request #407 from zombiezen/foreignkeys
Add _foreign_keys connection parameter
2017-04-02 23:13:39 +09:00
Ross Light c6d43c40e6 Add _foreign_keys connection parameter
Fixes #377
Updates #255
2017-04-01 11:06:59 -07:00
Ross Light 4c2dc8806a Avoid leaking db if setting busy timeout fails 2017-04-01 08:53:17 -07:00
Marko Kungla a1253acb6b
Removed ambitious conn.Close() 2017-03-24 01:06:55 +01:00
Yasuhiro Matsumoto fc03fa9989 close connection when got errors in Open 2017-03-24 08:48:29 +09:00
Yasuhiro Matsumoto 866c3293d9 fix breaking compatibility.
revert cf4bd560f1

close #394
2017-03-21 09:14:48 +09:00
Yasuhiro Matsumoto 0acd8f7aec fix build 2017-03-20 23:34:57 +09:00
Yasuhiro Matsumoto 997cab8094 fix build 2017-03-20 23:31:22 +09:00
Yasuhiro Matsumoto cf4bd560f1 fix build 2017-03-20 23:26:15 +09:00
Yasuhiro Matsumoto 53900fb4f0 return nil when last error is SQLITE_OK 2017-03-20 23:23:24 +09:00
Yasuhiro Matsumoto 32ab0d8730 refactoring 2017-03-05 22:16:51 +09:00
Conor Branagan bba480975b Add Go API for virtual tables
See https://www.sqlite.org/vtab.html for more details.

This work was started from
https://github.com/gwenn/gosqlite/blob/master/vtab.{c,go} and adds:

- Porting the API to go-sqlite3 APIs.
- Support for >= Go 1.6 without requiring the `cgocheck` flag to be changed.
- Filling out the unfinished callback functions for the `Vtable` struct.
- A simple `Context` API layer for ease of use when adding modules.

Tests are included.
2017-03-04 18:10:02 -05:00
Yasuhiro Matsumoto 253bbf431d rename function 2017-03-05 00:45:41 +09:00
Yasuhiro Matsumoto a7b54c9ddb workaround for a compiler
Apple LLVM version 7.0.2 (clang-700.1.81)

Close #386
2017-03-01 16:44:54 +09:00
Yasuhiro Matsumoto 2acfafad58 use variable db 2017-02-16 15:57:29 +09:00
Yasuhiro Matsumoto 588cd3292b fixes race 2017-02-11 21:48:33 +09:00
Yasuhiro Matsumoto a554cf198f close statement 2017-01-07 22:22:02 +09:00
Yasuhiro Matsumoto 6f2749a3ca fix race condition 2017-01-03 22:25:02 +09:00
Yasuhiro Matsumoto 056f235aa6 fix named args 2016-12-09 13:12:14 +09:00
Yasuhiro Matsumoto f043f8092b use prepare instead of Prepare 2016-11-09 01:13:34 +09:00
Yasuhiro Matsumoto d1009b4fa6 fix build 2016-11-08 17:12:03 +09:00
Yasuhiro Matsumoto bfeda3f4f6 fix build 2016-11-08 17:07:52 +09:00
Yasuhiro Matsumoto ea2afbe9e8 revert Multiple Result Set 2016-11-08 13:22:46 +09:00
Yasuhiro Matsumoto dc448a0cb6 fix trace callback. 2016-11-08 12:27:31 +09:00
Yasuhiro Matsumoto dd2c82226b fix trace callback.
Close #352
2016-11-08 12:19:51 +09:00
andrefsp 6c0a6bb9cd Fix data race introduced on 605d9d08
This commit will fix a data race introduced on 605d9d08 and also
make sure travis CI will now check for data races.
2016-11-07 11:57:52 +00:00
Yasuhiro Matsumoto deed33aec7 cancel 2016-11-06 20:46:27 +09:00
Yasuhiro Matsumoto 605d9d0851 cancel 2016-11-06 20:43:53 +09:00
Yasuhiro Matsumoto 0d1d1a644e go vet && golint 2016-11-05 00:40:06 +09:00
Yasuhiro Matsumoto 755d5be32c add BeginContext 2016-11-04 15:15:16 +09:00
Yasuhiro Matsumoto 025b917610 add PrepareContext 2016-11-04 15:11:24 +09:00
Yasuhiro Matsumoto b23526fb3c support named params 2016-11-04 15:00:29 +09:00
Yasuhiro Matsumoto c95a77965c context features 2016-11-04 14:24:22 +09:00
Yasuhiro Matsumoto 86681de00a remove -Wno-c99-extension
Close #343
2016-10-28 23:22:18 +09:00
Judson 61c9552d18
Added CFLAG config to ignore deprecations 2016-10-04 16:51:54 +01:00
Yasuhiro Matsumoto bf2cfc371a fix build 2016-09-08 00:59:25 +09:00
Yasuhiro Matsumoto 467e3720d8 fix build 2016-09-08 00:39:47 +09:00
A.N 0a2fcd29b6 Provide access to sqlite3_trace_v2(). 2016-09-07 23:48:06 +09:00
mattn e118d44513 Merge pull request #300 from sqweek/issue184
Fix inconsistent tx state with database/sql.
2016-07-15 22:38:49 +09:00
Zbigniew Mandziejewicz 3ebb821e65 Set SQLITE_DETERMINISTIC if undefined 2016-04-23 00:00:49 +08:00
sqweek 727ad200a2 Fix inconsistent tx state with database/sql.
The semantics of sql.Tx.Commit impose that the transaction is
finished and cleaned up by the time the driver's Commit function
returns. However sqlite3 leaves the transaction open if COMMIT
fails due to an SQLITE_BUSY error, so *we* must clean it up.

Closes #184.
2016-04-18 21:47:24 +08:00
David Bariod 3a5555302e Move sqlite3 amalgation files a directory up.
The purpose is to ease the use of vendoring files like godep.
The C sqlite3 files have been added a go compilation conditional flag
Fix #293
2016-04-02 12:48:26 +02:00
Zac Medico f544db98cc Add SQLiteRows.DeclTypes() method 2016-03-06 12:27:17 -08:00
Philip O Toole 1e280555b7 Fix minor typos in comments 2016-02-23 01:26:13 -05:00