Commit Graph

21 Commits (f1eef49b3fc2532228eb30e80b2f1731228a4d94)

Author SHA1 Message Date
Phil Eaton 3ccccfb4c9
Support returning any from callbacks (#1046)
Support returning any from callbacks
2022-05-29 21:06:43 -04:00
Hanzhen Yi 2b131e01c1
change angle bracket import to quotes (#868) 2021-10-26 00:23:19 +09:00
mattn 6a8b30186d
Use go-pointer instead of uintptr hacks. (#814)
* Use go-pointer instead of uintptr hacks.

Fixes #791

* Do same of go-pointer

* Drop older verion of Go

* Fix build

* Fix build
2020-08-26 09:36:43 +09:00
Yasuhiro Matsumoto fc06e55305
Add build constraints for non cgo 2019-11-18 18:03:31 +09:00
G.J.R. Timmer 2ea5857c0e Closes #597 2019-08-22 10:59:46 +02:00
Kevin Burke 6a26e21416
all: fix cgo compile failures on tip
Apparently the cgo typechecks get better on tip, so use C.int instead
of Go integers.

Build tip as part of the Travis build, so we can ensure that any
errors are resolved before they get released to a wider audience.
2018-11-01 20:42:26 -10:00
Grzegorz Marszałek e30f9ffa3a implementation of set_authorizer interface 2018-08-25 20:25:16 +02:00
Gert-Jan Timmer 6ae7f98274 ADD: User authentication
* User Authentication Implementation
* Rename file to conform to fileformat `sqlite3_*_omit.go`
* Updated sqlite3-binding.* with new upgrade tool
* Add: callbackRetNil required for error type return because of adding `RegisterFunc`s directly on the connection.
* Add: TestCreateAuthDatabase
2018-05-30 23:48:02 +02:00
mattn 132eeedb4a Merge branch 'master' into master 2017-08-30 19:57:18 +09:00
Jason Abbott 59bd281a89 Incorporate original PR 271 from https://github.com/brokensandals 2017-07-03 12:51:48 -06:00
David Anderson 0430b37250 Add support for collation sequences implemented in Go.
This allows Go programs to register custom comparison functions with
sqlite, and ORDER BY that comparator.
2017-06-08 19:14:07 -07:00
Yasuhiro Matsumoto dd2c82226b fix trace callback.
Close #352
2016-11-08 12:19:51 +09:00
Yasuhiro Matsumoto 297d6f8d2d update amalgamation code 2016-08-11 01:15:52 +09:00
Ian Lance Taylor 8c66b9cf5e callback: use handles rather than passing Go pointers
The cgo pointer passing rules forbid passing a Go pointer to C if that
pointer points to memory containing other Go pointers.  This is true
even if the Go pointer is converted to uintptr.

This change fixes the code to use a handle instead, and to look up the
handle in the callback function.
2016-01-29 13:18:39 -08:00
Yasuhiro Matsumoto 0d2359b64f fix #238 2015-09-16 15:58:07 +09:00
Yasuhiro Matsumoto fdc70a0fab use math.MaxInt32. related issue #238 2015-09-16 15:22:36 +09:00
Yasuhiro Matsumoto 09259a5557 fix build on 32bit OSs. Close #238 2015-09-16 15:18:46 +09:00
David Anderson 26917df7a6 Implement support for aggregation functions implemented in Go. 2015-09-15 18:05:49 -07:00
David Anderson b037a61690 Add support for interface{} arguments in Go SQLite functions.
This enabled support for functions like Foo(a interface{}) and
Bar(a ...interface{}).
2015-08-21 17:12:18 -07:00
David Anderson 122ddb16de Move argument converters to callback.go, and optimize return value handling.
A call now doesn't have to do any reflection, it just blindly invokes
a bunch of argument and return value handlers to execute the translation,
and the safety of the translation is determined at registration time.
2015-08-21 16:37:45 -07:00
David Anderson cf8fa0af80 Implement support for passing Go functions as custom functions to SQLite.
Fixes #226.
2015-08-21 13:39:50 -07:00