Commit Graph

557 Commits

Author SHA1 Message Date
gwenn
88a7ed5812 Fix clippy warnings 2018-05-13 19:16:12 +02:00
gwenn
370740b17f Oops 2018-05-13 13:03:05 +02:00
gwenn
33b1b19d92 Upgrade to csv 1.0 2018-05-13 12:21:58 +02:00
gwenn
6cbeb6ef59 Introduce context module
To make `set_result` and `report_error` in functions module
visible to vtab module.
2018-05-13 11:44:31 +02:00
gwenn
f4beb18904 Merge remote-tracking branch 'jgallagher/master' into vtab 2018-05-12 15:31:16 +02:00
gwenn
89f38b4098
Merge pull request #352 from jgallagher/fix-coherence-issue
merge coherence issue fix
2018-05-12 10:30:57 +02:00
gwenn
58b8b4c95d Introduce Aux associated type 2018-05-06 18:05:02 +02:00
gwenn
2e2b5c41f4 Rustfmt 2018-05-06 17:21:36 +02:00
gwenn
8e6ea05efa Use associated types instead of generics 2018-05-06 17:19:19 +02:00
gwenn
10ba0514e6 Change arguments parsing of CSV module 2018-05-06 12:41:42 +02:00
gwenn
5fa3810a4b Fix Clippy warnings 2018-05-06 08:45:56 +02:00
gwenn
1e3dc542a4 Merge remote-tracking branch 'jgallagher/master' into vtab 2018-05-06 08:00:12 +02:00
gwenn
702e58f744 Fix non-eponymous virtual table declaration
Ensure that xCreate is different from xConnect for non-eponymous
virtual tables (even when the implementation is the same).
2018-05-05 10:33:05 +02:00
gwenn
88f2f3e4bd
Merge pull request #350 from jgallagher/clippy
Fix clippy warnings
2018-05-04 20:44:34 +02:00
gwenn
994d40da26 Fix clippy warnings 2018-05-04 19:55:55 +02:00
gwenn
403e840c4a Fix clippy warnings 2018-05-04 19:05:48 +02:00
gwenn
b0e22fc372 Wait in a loop 2018-05-04 18:07:11 +02:00
gwenn
fee4bfcc86 Merge remote-tracking branch 'jgallagher/master' into unlock-notify 2018-05-04 18:06:41 +02:00
gwenn
30e23cf0a0 Fix features dependencies 2018-04-30 22:09:41 +02:00
gwenn
9c5c9e3c7e Merge remote-tracking branch 'jgallagher/master' into vtab 2018-04-30 22:02:14 +02:00
gwenn
83775ee62d Remove second field from RawStatement
Use sqlite3_db_handle instead
2018-04-03 20:18:51 +02:00
gwenn
7f6d7f3346
Merge pull request #319 from traviscross/fix/datetime-format-rfc3339
Fix date/time format for SQLite, use RFC 3339
2018-04-03 19:45:44 +02:00
gwenn
a0151f9073 Introduce is_locked 2018-03-31 10:22:19 +02:00
gwenn
cccdf9735f Factorize check on code returned by prepare/step. 2018-03-27 21:49:09 +02:00
gwenn
78511d6257
Merge pull request #334 from gwenn/stmt-cache
Fix statement cache
2018-03-27 21:26:42 +02:00
gwenn
50d379b564 Make Statement::column_index case insensitive
Fix #330
2018-03-27 20:07:46 +02:00
gwenn
83c8db2d21 Fix Connection::open documentation (#332) 2018-03-24 10:58:42 +01:00
gwenn
d962ebab55
Merge pull request #325 from rnewman/rnewman/panic
Add DropBehavior::Panic to enforce intentional commit or rollback.
2018-03-24 10:29:02 +01:00
gwenn
c612a44207 Fix errors relative to OpenFlags
Also handle extended error codes.
2018-03-24 10:15:10 +01:00
gwenn
5fd76aa54b Unlock notification
Test added
2018-03-24 08:06:30 +01:00
gwenn
154a70d41b WIP: Unlock Notification
To be tested
2018-03-24 08:06:30 +01:00
gwenn
455e7d4060 WIP: Unlock Notification
To do: unlock_notify_cb
2018-03-24 08:06:30 +01:00
gwenn
5d91fb088f Unlock notification 2018-03-24 08:03:21 +01:00
gwenn
0b85c5a1f2
Merge pull request #266 from gwenn/hooks
Implementation of sqlite3_update_hook #260
2018-03-24 07:33:29 +01:00
gwenn
718b985d86
Merge pull request #338 from gwenn/future-compatibility
Fix tyvar_behind_raw_pointer warnings
2018-03-24 03:14:16 +01:00
gwenn
3b5e224f82 Fix tyvar_behind_raw_pointer warnings 2018-03-10 18:07:30 +01:00
gwenn
db87de4086 Inline csv dependency 2018-03-10 17:05:22 +01:00
gwenn
96e5cf2239 Fix statement cache
SQLite ignores the SQL tail (whitespaces, comments).
We can easily ignore whitespaces by trimming the SQL.
2018-02-17 10:28:20 +01:00
gwenn
4357471197 Fix build errors related to bitflags 2018-01-27 10:32:58 +01:00
gwenn
3aaab1e36f Merge remote-tracking branch 'remotes/jgallagher/master' into vtab 2018-01-20 12:29:07 +01:00
gwenn
96103b0662 Merge remote-tracking branch 'jgallagher/master' into hooks 2018-01-20 10:08:40 +01:00
Richard Newman
2a03c1ad4d Add DropBehavior::Panic to enforce intentional commit or rollback. 2018-01-11 16:52:32 -08:00
Travis Cross
7e280d4e64 Add comment to justify &mut Connection in Transaction
The `Transaction` implementation never actually mutates the
`Connection` reference we give it.  In fact, the `Transaction`
structure itself only requires an immutable connection.  So it can be
surprising to readers that the constructor requires a `&mut
Connection`.  We do this so as to prevent at compile-time nested or
concurrent transactions on the same connection as these are not
allowed by SQLite.

In this commit, we add a comment explaining this nuance.
2017-12-31 10:30:23 +00:00
Travis Cross
5d8a840b5d Fix date/time format for SQLite, use RFC 3339
We implement `ToSql` and `FromSql` for `time::Timespec` values.  Our
documentation indicates that we store the value in the same format
used by SQLite's built-in date/time functions, but this was not
correct.

We were using the format:

    %Y-%m-%d %H:%M:%S:%f %Z

This format cannot be interpreted at all by SQLite's built-in
date/time functions.  There are three reasons for this:

- SQLite supports only two timezone formats: `[+-]HH:MM` and the
  literal character `Z` (indicating UTC)

- SQLite does not support a space before the timezone indicator

- SQLite supports a period (`.`) between the seconds field and the
  fractional seconds field, but not a colon (`:`)

SQLite does support the RFC 3339 date/time format, which is standard
in many other places.  As we're always storing a UTC value, we'll
simply use a trailing `Z` to indicate the timezone, as allowed by RFC
3339.  The new format is:

    %Y-%m-%dT%H:%M:%S.%fZ

To avoid breaking applications using databases with values in the old
format, we'll continue to support it as a fallback for `FromSql`.

[1] https://www.sqlite.org/lang_datefunc.html
[2] https://tools.ietf.org/html/rfc3339
2017-12-24 22:15:31 +00:00
John Gallagher
aa64e2fb33 Remove potentially conflicting impl of ToSqlOutput.
Replace with manual implementations of all the types we provided impls
for before.
2017-12-05 19:40:09 -05:00
John Gallagher
4bfbb5f1fe Fix handful of clippy warnings. 2017-11-17 11:37:23 -07:00
John Gallagher
5f800eb285
Merge pull request #306 from jgallagher/twistedfall-master
Export RowIndex trait to allow external code to be generic over what can index be
2017-11-13 11:33:12 -07:00
John Gallagher
ccf9e6fe6c Merge branch 'master' of https://github.com/twistedfall/rusqlite into twistedfall-master 2017-11-13 08:30:29 -07:00
John Gallagher
6b81979eea Merge branch 'master' of https://github.com/lgarczyn/rusqlite into lgarczyn-master 2017-11-13 08:27:33 -07:00
John Gallagher
217e12fcee
Merge pull request #304 from jgallagher/gwenn-clippy
Fix some clippy warnings
2017-11-13 08:23:52 -07:00