Yasuhiro Matsumoto
16b935f7cc
Use C.int in exported callbacks to match C declarations
2026-07-13 10:52:07 +09:00
mattn
423f9605f3
Make callback handle lookups lock-free
2026-06-18 04:28:39 +00:00
Yasuhiro Matsumoto
c3e96cd5bb
call sqlite3_value_blob before sqlite3_value_bytes in callbackArgString
2026-06-10 02:17:43 +09:00
dxbjavid
b1e8d68f31
read text value before its byte length to match documented order
2026-06-09 21:51:53 +05:30
dxbjavid
6b68c20301
preserve embedded NUL bytes in custom function text values
2026-06-09 16:29:57 +05:30
dxbjavid
5f1e21dd1e
guard oversized blob length in callbackRetBlob
2026-06-05 20:44:39 +05:30
Yasuhiro Matsumoto
8d69329881
revert #1259
2025-04-03 01:27:34 +09:00
Halil ibrahim Onay
b9f4d8c067
chore: Fix memory leak in callbackRetText function
2025-04-01 22:33:32 +09:00
Yasuhiro Matsumoto
1f0dc0a0ef
go fmt ./...
2024-01-25 22:55:22 +09:00
Yasuhiro Matsumoto
c91bca4fb4
update go version to 1.19
2024-01-25 22:55:22 +09:00
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