Philip O'Toole
cd1cbf523a
Sync database-close and statement-close
...
Potential fix for issue #426 .
2017-06-17 12:26:06 -07:00
Philip O'Toole
b951516ea0
Merge pull request #2 from mattn/master
...
Merge upstream
2017-06-17 12:02:47 -07:00
mattn
83c59d8440
Merge pull request #425 from xxr3376/empty-bytes
...
Treat []byte{} as empty BLOB instead of NULL.
2017-06-15 10:15:43 +09: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
83772a7051
Merge pull request #421 from flimzy/readme
...
Use "sqlite3" instead of "sqlite" in usage example.
2017-05-29 23:59:28 +09:00
Jonathan Hall
47e1f81069
Use "sqlite3" instead of "sqlite" in usage example.
...
And a minor grammar improvement.
2017-05-29 15:57:51 +02:00
mattn
cf7286f069
Merge pull request #409 from kenshaw/add-vtable-insert-update-delete-unit-test
...
Adding unit test for VTable Insert/Update/Delete
2017-04-08 00:46:27 +09:00
Kenneth Shaw
18135fa650
Adding unit test for VTable Insert/Update/Delete
2017-04-07 14:23:08 +07:00
mattn
f68bb95000
Merge pull request #399 from kenshaw/add-vtable-updater-hook
...
Adding hook to vtable to allow VTab's to be updated
2017-04-05 10:57:31 +09:00
mattn
46e826d22a
Merge pull request #407 from zombiezen/foreignkeys
...
Add _foreign_keys connection parameter
2017-04-02 23:13:39 +09:00
mattn
c935ccca28
Merge pull request #406 from zombiezen/fixleak
...
Avoid leaking db if setting busy timeout fails
2017-04-02 23:10:16 +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
Kenneth Shaw
b8936b7ad3
Adding hook to vhook to allow vtables to be modified
...
This commit changes the vtable 'xUpdate' goModule field to a new
'cXUpdate' callback function which in turns calls a 'goVUpdate'
callback.
This new callback allows Go defined virtual table implementations
satisfying the VTabUpdater interface (also newly defined) a way to
delete/insert/update rows in a VTab.
Additionally, an anonymous interface is used within the goVUpdate
callback looking for 'TableName() string' which, when defined on a VTab
is used to provide a better contextual error message to end users if the
VTab is read only.
Care was taken to follow existing code style/conventions for this
addition, and for backwards-compatibility with existing VTab
implementations (hence why a new interface was required).
2017-03-24 15:35:33 +07:00
mattn
b2e464529e
Merge pull request #398 from mkungla/qfe1
...
Removed ambitious conn.Close()
2017-03-24 09:12:00 +09: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
bd7fdb6033
fix test
2017-03-21 00:57:55 +09:00
Yasuhiro Matsumoto
1d0b0f0e72
disable extension when loading failed
2017-03-21 00:47:07 +09:00
Yasuhiro Matsumoto
796dcab06d
fix test
2017-03-21 00:42:54 +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
eac1dfa2a6
fix test
2017-03-05 23:02:06 +09:00
Yasuhiro Matsumoto
ecc5105e21
golint
2017-03-05 22:29:09 +09:00
Yasuhiro Matsumoto
0dba8bb9aa
rename
2017-03-05 22:25:33 +09:00
Yasuhiro Matsumoto
9a7131f1a9
add test env
2017-03-05 22:20:06 +09:00
Yasuhiro Matsumoto
835dea39a6
vtable is not default
2017-03-05 22:18:56 +09:00
Yasuhiro Matsumoto
32ab0d8730
refactoring
2017-03-05 22:16:51 +09:00
Yasuhiro Matsumoto
d5ce94296e
rename
2017-03-05 21:40:25 +09:00
Yasuhiro Matsumoto
f694bb773c
remove dependency of assert
2017-03-05 21:33:03 +09:00
Yasuhiro Matsumoto
0147a481cf
add gorepocard badge
2017-03-05 21:05:35 +09:00
Yasuhiro Matsumoto
0ff13e6771
golint
2017-03-05 21:05:28 +09:00
Yasuhiro Matsumoto
f238067266
remove type ZeroBlobLength
2017-03-05 20:55:32 +09:00
Yasuhiro Matsumoto
f9e79c0a39
golint
2017-03-05 20:52:55 +09:00
Yasuhiro Matsumoto
a9d61d54c6
use pointer receiver
2017-03-05 20:49:45 +09:00
Yasuhiro Matsumoto
fca908b496
fix import path
2017-03-05 20:48:17 +09:00
mattn
55cd56d7ed
Merge pull request #347 from DataDog/dd/vtable
...
Add Go API for virtual tables
2017-03-05 20:44:09 +09:00
Conor Branagan
9efa963d05
[vtable] Rename Context to SQLiteContext
...
To not conflict with core "context" package naming.
2017-03-04 18:37:04 -05:00
Conor Branagan
618e784627
[vtable] Add pure Go example of GitHub repo vtable.
2017-03-04 18:10:02 -05: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
3439fd2096
fix test
2017-03-05 02:37:15 +09:00
Yasuhiro Matsumoto
5b1175ef06
not use underscore
2017-03-05 00:46:52 +09:00
Yasuhiro Matsumoto
253bbf431d
rename function
2017-03-05 00:45:41 +09:00
Yasuhiro Matsumoto
cc256c7b14
add godoc for fixes golint
2017-03-05 00:43:26 +09:00
Yasuhiro Matsumoto
231af577dc
fix typos
2017-03-05 00:34:36 +09:00
Yasuhiro Matsumoto
2fc807f668
use named field
2017-03-05 00:33:42 +09:00