Commit Graph

362 Commits

Author SHA1 Message Date
Zbigniew Mandziejewicz e8363dc691 Instructions for libsqlite3 on OS X 2016-04-18 20:21:32 +08:00
Zbigniew Mandziejewicz bce6ca7501 Disable LoadExtension when omit_load_extension is specified 2016-04-18 20:21:32 +08:00
Zbigniew Mandziejewicz 4bc448f79b Disable LoadExtension when omit_load_extension is specified 2016-04-18 19:58:56 +08:00
Zbigniew Mandziejewicz da9decb965 Expose LoadExtension with entry point 2016-04-18 17:05:50 +08:00
Yasuhiro Matsumoto 0d708316a6 delete needless files 2016-04-18 01:11:20 +09:00
mattn f8a41b9e6e Merge pull request #294 from dgsb/master
Move sqlite3 amalgation files a directory up.
2016-04-18 01:10:19 +09:00
mattn aeb3180df5 Merge pull request #296 from stanim/errs
add missing error checks in simple example
2016-04-15 17:44:20 +09:00
Stani ed21175288 add missing error checking to simple example 2016-04-14 20:56:02 +02: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
mattn 37aa7c6f5b Merge pull request #291 from diocles/patch-1
Fix sqlite "regexp" function name in documentation
2016-03-25 01:18:33 +09:00
Tim Retout 7b2244eaa4 Fix sqlite "regexp" function name in documentation 2016-03-24 15:58:39 +00:00
Yasuhiro Matsumoto 76e335f60b Remove gocov 2016-03-15 13:09:03 +09:00
mattn 1f1995912c Merge pull request #286 from y0za/fix-testing-message
Fix testing message at TestInsert and TestUpdate
2016-03-15 10:26:45 +09:00
yoza caab59fb66 Fix testing message at TestInsert and TestUpdate 2016-03-14 20:54:10 +09:00
mattn 10876d7dac Merge pull request #282 from zmedico/decltypes
Add SQLiteRows.DeclTypes() method
2016-03-07 18:57:06 +09:00
Zac Medico 4f5821ada6 Test SQLiteRows.DeclTypes() 2016-03-07 01:15:24 -08:00
Bruce Marriner 0ebdb8bead Conditional build for the FTS5 Extension 2016-03-07 16:20:02 +09:00
Zac Medico f544db98cc Add SQLiteRows.DeclTypes() method 2016-03-06 12:27:17 -08:00
mattn 45f056ca8f Merge pull request #278 from rkintzi/json1
Conditional build for the JSON1 Extension
2016-03-03 00:32:50 +09:00
Radosław Kintzi 6dab4fc2ee Conditional build for the JSON1 Extension 2016-02-28 09:53:54 +01:00
mattn 09d5c45171 Merge pull request #275 from otoolep/fix_typos
Fix minor typos in comments
2016-02-23 16:32:46 +09:00
Philip O Toole 1e280555b7 Fix minor typos in comments 2016-02-23 01:26:13 -05:00
mattn c5aee96497 Merge pull request #267 from ianlancetaylor/go16
bind: pass &v[0] in direct call to C
2016-02-01 14:34:37 +09:00
mattn 57d9aeb35a Merge pull request #268 from ianlancetaylor/handle
callback: use handles rather than passing Go pointers
2016-01-31 23:50:31 +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
Ian Lance Taylor b76c61051f bind: pass &v[0] in direct call to C
In Go 1.6, the cgo checking rules are more precise when they see an
address operation as an argument to the C function.  When you pass &v[0]
to a C function, the cgo check just verifies that v itself does not
contain any pointers.  When you write `p := &v[0]` and then pass p to
the C function, the cgo check is conservative: it verifies that the
entire memory block to which p points does not contain any pointers.
When the bind function is called by code that passes a slice that is
part of a larger struct, this means that the cgo check will look at the
entire larger struct, not just the slice.  This can cause a surprising
run time failure.

Avoid this problem by rewriting the code slightly to pass &v[0] in the
call to the C function itself.

In particular this fixes the tests of github.com/jmoiron/sqlx when using
Go 1.6.
2016-01-29 12:39:47 -08:00
mattn 0cc1174c16 Merge pull request #266 from tcyrus/patch-1
Update README.md
2016-01-29 10:38:29 +09:00
Timothy Cyrus 298ea4316b Update README.md
Changed PNG Badges to SVG and Added GoDoc Badge
2016-01-28 20:28:43 -05:00
Vladimir Timofeev f33c9767fb Upgrade sqlite amalgamation to latest 3.10.2 2016-01-22 13:15:37 +03:00
Vladimir Timofeev 5f58255164 Upgrade sqlite amalgamation to latest 3.10.1 2016-01-22 13:15:26 +03:00
mattn 5510da3995 Merge pull request #262 from keybase/master
Fix compile for old mingw32
2015-12-30 23:39:53 +09:00
Yasuhiro Matsumoto e969434e25 avoid cgoCheckPointer. ref https://github.com/golang/go/issues/12416 2015-12-30 23:29:15 +09:00
Taru Karttunen 61be132244 Fix compile for old mingw32 2015-12-30 00:19:24 +02:00
mattn 5651a9d9d4 Merge pull request #252 from marcelolima/master
Fix README project address
2015-11-06 23:54:04 +09:00
Marcelo Lima 0ad9f0ce2f Fix README project address 2015-11-06 11:23:34 -03:00
mattn 2513631704 Merge pull request #251 from larsmans/fixes
Clean up tempfiles in tests
2015-11-03 22:05:16 +09:00
Lars Buitinck 21637a6531 Clean up tempfiles in tests
"go test" leaves no more clutter in /tmp.
2015-11-03 13:52:28 +01:00
Yasuhiro Matsumoto a755cdc361 Merge branch 'master' of https://github.com/mattn/go-sqlite3 2015-11-02 11:56:57 +09:00
Yasuhiro Matsumoto 59f20de728 fix tests 2015-11-02 11:56:49 +09:00
Yasuhiro Matsumoto 167173a31f Merge branch 'pr/207' 2015-11-02 11:53:42 +09:00
mattn 80ee1ba77c Merge pull request #243 from augustoroman/master
Store/retrieve timezones for time.Time values.
2015-11-02 11:43:53 +09:00
mattn 008acb738c Merge pull request #250 from DavidGamba/install-in-readme
Update README. Install go-sqlite3 to avoid builds with gcc
2015-11-02 11:38:41 +09:00
David Gamba 90af0d5722 Update README. Install go-sqlite3 to avoid builds with gcc 2015-10-31 00:59:28 -06:00
Augusto Roman 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
looi b808f01f66 Add FTS4 unicode61 tokenizer support 2015-09-21 19:53:44 +09: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
Yasuhiro Matsumoto 64bb935391 remove binary file 2015-09-16 10:47:42 +09:00
mattn 0bb7f1c676 Merge pull request #229 from danderson/master
Implement support for calling Go functions from SQLite
2015-09-16 10:46:17 +09:00