Commit Graph

74 Commits

Author SHA1 Message Date
Maas-Maarten Zeeman
dc294c0d25 Don't release the connection when prepare_v2 fails 2017-02-24 16:28:08 +01:00
Maas-Maarten Zeeman
785903ae6d Keep a reference to the connection before the prepare statement is put on the command queue.
This should fix a race condition when a prepare is called right before the
db connection is garbage collected.
2017-02-22 22:03:26 +01:00
Maas-Maarten Zeeman
3d546ff8a4 Empty the command queue before destroying it. It could contain commands. Fixes a crash 2016-12-16 11:14:33 +01:00
Maas-Maarten Zeeman
f7b151f64c Merge pull request #27 from NineFX/bump-sqlite-version
Bump SQLite version
2015-08-02 17:01:36 +02:00
Maas-Maarten Zeeman
c295381715 Removed unneeded queue_send and made closing the db more robust. Does this fix #20? 2015-08-02 16:55:36 +02:00
Drew Varner
db9383cc30 Bump SQLite version
Bump SQLite to 3.8.11
2015-07-25 15:28:04 -04:00
jazzyb
0a073b18e9 fixes sqlite3_column_count() return check
sqlite3_column_count() may return 0 for SQL statements that do not return rows
from the database.  This should not be treated as an error.

See:  https://sqlite.org/c3ref/column_count.html
2015-04-16 22:29:50 -04:00
jazzyb
2a32ad90e6 fixes column types error 2015-02-28 11:10:18 -05:00
Maas-Maarten Zeeman
9bc0713f79 Better version check 2015-02-01 13:40:06 +01:00
Maas-Maarten Zeeman
c6976193da Updated sqlite to version 3.8.8.2 2015-02-01 09:54:21 +01:00
Michael Ries
19080b849c get column types 2015-01-30 09:24:00 -07:00
Maas-Maarten Zeeman
6428cec6dd Make sure the statement is reset after a in step. Fixes #10 2014-06-16 22:24:59 +02:00
Maas-Maarten Zeeman
d0fb9156a8 Use sqlite3_close_v2, it automatically closes the db after the last statement finishes 2014-06-16 16:42:25 +02:00
Maas-Maarten Zeeman
2a5c521cda Simplified error handling of do_step as any error code can be returned by prepare_v2 2014-06-16 16:36:12 +02:00
Maas-Maarten Zeeman
297b829482 Ensure that an error message is returned 2014-06-16 16:18:17 +02:00
Maas-Maarten Zeeman
af213d6df7 Upgrading sqlite to version 3.8.5 2014-06-16 15:03:29 +02:00
Maas-Maarten Zeeman
4841764b94 merge 2014-06-15 21:19:25 +02:00
Arjan Scherpenisse
d860e0182c Return SQLITE_CONSTRAINT error 2014-06-15 09:17:52 +02:00
Arjan Scherpenisse
476c34e1e3 Add esqlite3:changes/3 function to get nr of affected rows 2014-06-15 00:14:11 +02:00
Arjan Scherpenisse
9ca051542d Removed 'unexpected return code'; we're using the v2 version of sqlite_prepare
See http://www.sqlite.org/c3ref/step.html; any error code can be returned.
2014-01-19 20:41:54 +01:00
Maas-Maarten Zeeman
8be2c9ec35 Return an error when the input is not an iolist 2013-11-29 21:59:54 +01:00
Maas-Maarten Zeeman
5fde2244f3 Bumped sqlite to version 3.8.1 2013-11-29 21:54:56 +01:00
Maas-Maarten Zeeman
8cdd55de20 Forgot to add static keyword 2013-11-29 21:53:18 +01:00
Maas-Maarten Zeeman
9df3a49445 Use a selective receive, and ignore stale answers. I think this fixes #3 2013-11-28 19:41:40 +01:00
qingliangcn
0578386bc3 fix overflow problem when insert function returned value larger than int32 2013-11-28 21:35:15 +08:00
qingliangcn
a921bd65b2 add insert function to get last insert rowid 2013-11-28 00:22:40 +08:00
qingliangcn
b2d1f7ed9f support nif module reload and upgrade 2013-11-27 18:47:39 +08:00
Maas-Maarten Zeeman
1d27deb3c0 Addes support for 64-bit integers. 2013-03-08 22:34:47 +01:00
Maas-Maarten Zeeman
cfe06ddfd9 New trick to get 0 terminated strings from an iolist 2013-02-22 08:37:20 +01:00
Maas-Maarten Zeeman
7fa56acf34 Set a busy timeout when opening the connection. 2013-02-09 10:04:58 +01:00
Maas-Maarten Zeeman
b6066c269d Support for utf-8 text. Blobs as separate entities 2013-01-01 21:45:24 +01:00
Maas-Maarten Zeeman
ec04d67632 Check for issue #2. No problem... Fixes #2 2013-01-01 14:42:43 +01:00
Maas-Maarten Zeeman
827a8c1756 Added specs 2012-12-26 23:51:54 +01:00
Maas-Maarten Zeeman
3697633c6b Changed plain 'error' to 'sqlite_error' 2012-12-26 16:51:20 +01:00
Maas-Maarten Zeeman
425e9947bb Enabled the FTS extensions 2012-12-26 15:43:55 +01:00
Maas-Maarten Zeeman
6f7574fa1f Return sqlite3 errors from step. 2012-12-26 14:44:47 +01:00
Maas-Maarten Zeeman
2b669a706f Step now returns {row, Row} to more clearly return errors 2012-12-26 14:25:53 +01:00
Maas-Maarten Zeeman
661e417c90 Better error responses. Fixes #1 2012-10-29 23:57:27 +01:00
Maas-Maarten Zeeman
d6b8bbbbd4 Removed duplicated code 2012-10-28 08:37:36 +01:00
Maas-Maarten Zeeman
6624096b93 Fixed indentation 2012-10-28 08:14:21 +01:00
Maas-Maarten Zeeman
768d4b198d Updated sqlite3 to version 3.7.14.1 2012-10-28 07:20:09 +01:00
Maas-Maarten Zeeman
719197313a Busy with creating an edbc lib 2011-12-28 21:31:14 +01:00
Maas-Maarten Zeeman
df30e78b25 Removed static created atoms 2011-11-21 23:04:03 +01:00
Maas-Maarten Zeeman
a082740cb6 Adding column names functionality 2011-11-21 20:34:13 +01:00
Maas-Maarten Zeeman
e04da6dcc7 Adding column names functionality 2011-11-21 11:47:01 +01:00
Maas-Maarten Zeeman
ca68887b17 Added copyright notice 2011-11-06 21:57:59 +01:00
Maas-Maarten Zeeman
a015580021 Split off low-level api in separate file 2011-11-06 21:37:35 +01:00
Maas-Maarten Zeeman
587b8d255b Error handling in bind 2011-11-04 22:01:16 +01:00
Maas-Maarten Zeeman
dcfd5f5403 Now also binds text 2011-11-04 21:33:57 +01:00
Maas-Maarten Zeeman
69bf43054d Now also binds text 2011-11-04 21:17:34 +01:00