0
0
mirror of https://github.com/mattn/go-sqlite3.git synced 2025-06-04 01:10:35 +00:00

111 Commits

Author SHA1 Message Date
e30f9ffa3a implementation of set_authorizer interface 2018-08-25 20:25:16 +02:00
d31a44a0bd Use t.Skip for TestUpsert to be compliant with the actual cade base. 2018-06-12 13:55:59 +02:00
2439c84c29 fix upsert log typos. 2018-06-12 13:55:59 +02:00
a06d1c9512 bump sqlite3 3.24.0 and add TestUpsert. 2018-06-12 13:55:59 +02:00
62b7bd5f54 fix/118
* Added TestMultiBlobs
* Removed dead code

Fixes 
2018-06-12 11:06:00 +02:00
140b80506d Add zero-length slice test 2018-05-31 08:22:26 -03:00
8d6d326be6 Add nil check in bind and a test 2018-05-30 21:39:01 -03:00
397c95cd5e Merge pull request from mjtrangoni/fix-linter-issues
Fix linter issues
2018-04-17 22:17:04 +09:00
b75aefcf46 fix small codespell issue 2018-04-17 12:33:03 +02:00
28e6f6d675 fix all gosimple issues 2018-04-17 12:21:29 +02:00
7174000f77 Move RegisterAggregator implementation
The SQLiteConn.RegisterAggregator implementation was defined in
sqlite3_trace.go file, which is guarded with a build constraint. This
change simply moves RegisterAggregator to the main sqlite3.go file,
and moves accompanying unit tests.

The rationale for this move is that it was not possible for downstream
using packages to use RegisterAggregator without also specifying (and
notifying the user) the 'trace' build tag.
2017-11-05 09:18:06 +07:00
132eeedb4a Merge branch 'master' into master 2017-08-30 19:57:18 +09:00
b1c8062c18 Improved TestNilAndEmptyBytes
I forgot that bytes.Equals treats nil and []byte{} as equal.
2017-08-21 13:46:00 -07:00
d1772f0826 Added TestNilAndEmptyBytes 2017-08-21 13:22:09 -07:00
6654e412c3 fix test 2017-08-02 02:06:40 +09:00
7133e5d7f5 ignore errors in teardown 2017-08-02 01:49:00 +09:00
42a4d148c2 fix tests on tip 2017-08-02 01:26:57 +09:00
848386d7a2 Add connection option for recursive triggers
Similar to foreign keys, the recursive triggers PRAGMA affects the
interpretation of all statements on a connection.
2017-07-09 07:32:14 -07:00
59bd281a89 Incorporate original PR 271 from https://github.com/brokensandals 2017-07-03 12:51:48 -06:00
05123859be Don't convert Unix times to nanoseconds when querying datetime fields. Fixes . 2017-06-30 13:17:04 -05:00
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
c6d43c40e6 Add _foreign_keys connection parameter
Fixes 
Updates 
2017-04-01 11:06:59 -07:00
5b1175ef06 not use underscore 2017-03-05 00:46:52 +09:00
7ed900a7c4 fix test 2017-01-19 02:20:42 +09:00
15491aeb9c go vet && golint 2016-11-06 13:16:38 +09:00
57eaf4c070 separate test 2016-11-04 15:17:21 +09:00
b23526fb3c support named params 2016-11-04 15:00:29 +09:00
6796d46c3a implement go18 Pinger 2016-11-03 23:05:34 +09:00
3fb7a0e792 TestAggregatorRegistration may fail if trace feature is not implemented 2016-09-08 01:20:43 +09:00
caab59fb66 Fix testing message at TestInsert and TestUpdate 2016-03-14 20:54:10 +09:00
4f5821ada6 Test SQLiteRows.DeclTypes() 2016-03-07 01:15:24 -08:00
21637a6531 Clean up tempfiles in tests
"go test" leaves no more clutter in /tmp.
2015-11-03 13:52:28 +01:00
a755cdc361 Merge branch 'master' of https://github.com/mattn/go-sqlite3 2015-11-02 11:56:57 +09:00
59f20de728 fix tests 2015-11-02 11:56:49 +09:00
167173a31f Merge branch 'pr/207' 2015-11-02 11:53:42 +09:00
7b0d180ce9 Store/retrieve timezones for time.Time values.
Previously, the timezone information for a provided value was discarded
and the value always stored as in UTC.  However, sqlite allows specifying
the timezone offsets and handles those values appropriately.  This change
stores the timezone information and parses it out if present, otherwise
it defaults to UTC as before.

One additional bugfix:  Previously, a unix timestamp in seconds was
parsed in the local timezone (rather than UTC), in contrast to a unix
timestamp in milliseconds that was parsed in UTC.

While fixing that extra bug, I cleaned up the parsing code -- no need to
convert to a string and then parse it back again and risk a parse error,
just to check the number of digits.

The tests were extended to cover non-UTC timezones storage & retrieval,
meaningful unix timestamps, and correct handling of a trailing Z.
2015-10-09 22:59:25 -07:00
0bb7f1c676 Merge pull request from danderson/master
Implement support for calling Go functions from SQLite
2015-09-16 10:46:17 +09:00
26917df7a6 Implement support for aggregation functions implemented in Go. 2015-09-15 18:05:49 -07:00
296ddf7cd7 Fix test. Close
When one goroutine close db that opended as :memory:, session
will be lost. So another goroutine can't refer the last session.
goroutine .
2015-08-25 23:40:01 +09:00
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
566f63a43a Implement support for variadic functions.
Currently, the variadic part must all be the same type, because there's
no "generic" arg converter.
2015-08-21 16:38:23 -07:00
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
cf8fa0af80 Implement support for passing Go functions as custom functions to SQLite.
Fixes .
2015-08-21 13:39:50 -07:00
5674e19d05 Test read-only databases 2015-06-05 16:38:51 +02:00
a3efcea001 Clean up more tempfiles 2015-06-05 16:38:51 +02:00
cebbf42ff6 Get reliable tempfile names from ioutil.TempFile
Also makes them easier to spot (the tests tend to litter /tmp).
2015-06-05 16:38:51 +02:00
f136f0c8dc Remove debug code 2015-04-15 16:27:00 +09:00
dee1a37fe1 Z suffix should be no-op 2015-04-15 16:26:27 +09:00
5f64400729 Merge pull request from hallyn/tximm.2
Add a txlock option when opening databases
2015-04-14 09:12:54 +09:00
f91a09fb50 Add a txlock option when opening databases (v2)
When specified, changes the default locking at a tx.Begin.

Changelog (v2):
	Add a testcase to ensure _txlock is properly handled.

Closes 

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
2015-04-13 11:48:01 -05:00