aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go (follow)
Commit message (Expand)AuthorAgeFilesLines
* 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. Ian Lance Taylor2016-01-291-2/+3
* avoid cgoCheckPointer. ref https://github.com/golang/go/issues/12416Yasuhiro Matsumoto2015-12-301-2/+16
* Merge branch 'master' of https://github.com/mattn/go-sqlite3Yasuhiro Matsumoto2015-11-021-11/+11
|\
| * 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. Augusto Roman2015-10-091-11/+11
* | Merge branch 'pr/207'Yasuhiro Matsumoto2015-11-021-1/+1
|\ \ | |/ |/|
| * Fix doc commentLars Buitinck2015-06-051-1/+1
* | Add FTS4 unicode61 tokenizer supportlooi2015-09-211-1/+1
* | Merge pull request #229 from danderson/master•••Implement support for calling Go functions from SQLitemattn2015-09-161-3/+320
|\ \
| * | Implement support for aggregation functions implemented in Go.David Anderson2015-09-151-33/+210
| * | Add support for interface{} arguments in Go SQLite functions.•••This enabled support for functions like Foo(a interface{}) and Bar(a ...interface{}). David Anderson2015-08-211-5/+8
| * | Implement support for variadic functions.•••Currently, the variadic part must all be the same type, because there's no "generic" arg converter. David Anderson2015-08-211-10/+42
| * | 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. David Anderson2015-08-211-104/+18
| * | Implement support for passing Go functions as custom functions to SQLite.•••Fixes #226. David Anderson2015-08-211-0/+191
* | | 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> Jessica Frazelle2015-09-041-17/+2
|/ /
* / Add fix for go-sqlite3 truncating 64-bit integers when compiled by 32-bit min...kiwih2015-08-071-8/+8
|/
* Z suffix should be no-opYasuhiro Matsumoto2015-04-151-0/+1
* Merge pull request #194 from hallyn/tximm.2•••Add a txlock option when opening databasesmattn2015-04-141-4/+23
|\
| * 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 #189 Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Serge Hallyn2015-04-131-4/+23
* | Fix NULs in text.•••NUL character is a valid symbols in UTF8. Fixes #195 Egon Elbre2015-04-121-1/+3
|/
* Merge pull request #188 from larsmans/optimize•••Optimize queriesmattn2015-03-241-19/+23
|\
| * Change strlen(s) > 0 => *s != '\000'.Lars Buitinck2015-03-231-1/+1
| * Less C/Go border crossing to get database changes•••Speeds up the query benchmark by about 5% (Go 1.2.1, Linux x64). Lars Buitinck2015-03-231-18/+22
* | Implement number-named parameters. Close #187mattn2015-03-241-3/+19
* | Revert a6c208564eccf3c6743f608ef88398a4ca84c5ebmattn2015-03-221-41/+3
* | Remove debug messagemattn2015-03-221-1/+0
* | Fix hang in testmattn2015-03-221-11/+12
* | Fix buildmattn2015-03-221-1/+2
* | Should use C.int()mattn2015-03-221-1/+1
* | revert 5253daf8561a6ca5015fd5ce79e4367912146be9 and add _busy_timeout query p...mattn2015-03-221-20/+25
* | Support $NNN-style named parameter. Close #187mattn2015-03-221-4/+57
* | Next() should wait while BUSY or LOCKED because return value is boolmattn2015-03-191-9/+17
|/
* Apply -lpthread withou windows.Yasuhiro Matsumoto2015-03-121-1/+0
* Link against pthread•••This is required by gccgo because of the pthread_mutex_trylock symbol. Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Stéphane Graber2015-03-111-0/+1
* Rename sqlite3.{c,h} to sqlite3-binding.{c,h}•••This fixes the problem where when building with gccgo, sqlite3.c is overwritten, leading to a build failure. An alternative would have been to move sqlite3*.{c,h} to a subdirectory, but that seems to confuse the linker a fair bit and would just swap one implementation-dependent issue for another. Closes #20 Signed-off-by: Stéphane Graber <stgraber@ubuntu.com> Stéphane Graber2015-03-111-1/+1
* Correct HasPrefix method nameAntoni Rościszewski2015-03-051-1/+1
* Don't modify dsn when has prefix file:mattn2015-03-061-1/+3
* Fix filename with loc parameterYasuhiro Matsumoto2015-03-051-1/+1
* Fix loc parsingmix32015-03-051-27/+31
* Fixed bug for loc parametermattn2015-03-051-16/+18
* cleanup codeYasuhiro Matsumoto2015-03-041-13/+8
* Add loc=XXX parameters to handle timezoneYasuhiro Matsumoto2015-03-041-8/+44
* Add FTS3 feature. Close #176Yasuhiro Matsumoto2015-02-241-0/+2
* load extensions using the C API instead of SQL•••This fixes the problem of loading ICU, which needs to replace existing functions. Replacing existing functions are prohibited when a VM is running. Attila Tajti2015-01-261-11/+5
* Return error code of sqlite3_step, not sqlite3_resetMahadevan2015-01-261-1/+2
* Handle 13 digit datetime valuesIan Bishop2015-01-021-1/+13
* set CFLAGS: -std=gnu99•••Fixes the following error message on SmartOS: $ go get github.com/mattn/go-sqlite3 In file included from /usr/include/stdio.h:37:0, from go/src/github.com/mattn/go-sqlite3/sqlite3.c:8422: /opt/local/gcc47/lib/gcc/i386-sun-solaris2.11/4.7.3/include-fixed/sys/feature_tests.h:366:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99" Nahum Shalman2014-12-181-0/+1
* Catch missing arguments for Query()•••Also improved error message on Exec() for consistency.Josiah Kiehl (formerly @bluepojo)2014-11-291-1/+5
* Reset statement. Fixes #150mattn2014-11-161-0/+2
* set/reset finalizer to free SQLite3 handlesmattn2014-11-141-2/+7
* rows.Close()mattn2014-11-141-0/+1