Commit Graph

558 Commits

Author SHA1 Message Date
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
Philip O'Toole baa815b31d Fix reversed source and destination names 2016-02-28 11:51:49 -08:00
Philip O'Toole 960d6a342a Alphabetical imports 2016-02-28 11:51:49 -08: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
Philip O'Toole 3e97a4ca68 Merge pull request #1 from mattn/master
Bring master up-to-date
2016-02-23 01:18:14 -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
David Anderson 26917df7a6 Implement support for aggregation functions implemented in Go. 2015-09-15 18:05:49 -07:00
mattn 3b3f1d01b2 Merge pull request #235 from jfrazelle/static_remove_dlopen
remove dlopen if static_build flag
2015-09-05 23:49:54 +09:00
Jessica Frazelle e37121d4ea introduce ability to pass sqlite_omit_load_extension
sqlite_omit_load_extension is a go build tag which behaves much like its
C counterpart SQLITE_OMIT_LOAD_EXTENSION

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
2015-09-04 14:46:16 -07:00
mattn 897b8800a7 Merge pull request #231 from marccampbell/master
Fix example to check the correct error value
2015-08-26 01:33:44 +09:00