Commit Graph

1316 Commits

Author SHA1 Message Date
gwenn
774a32bb95 Update changelog [ci skip] 2018-04-03 19:54:25 +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
2aebdeb46a
Merge pull request #341 from gwenn/column-index
Make Statement::column_index case insensitive (#330)
2018-03-27 21:14:00 +02:00
gwenn
7f193c03f1 Upgrade stable version used by appveyor 2018-03-27 20:40:41 +02:00
gwenn
5b8721b6a7 Update changelog [ci skip] 2018-03-27 20:19:28 +02:00
gwenn
50d379b564 Make Statement::column_index case insensitive
Fix #330
2018-03-27 20:07:46 +02:00
gwenn
b1b1d70ba9
Merge pull request #340 from gwenn/fix-doc
Fix Connection::open documentation (#332)
2018-03-24 11:01:49 +01:00
gwenn
83c8db2d21 Fix Connection::open documentation (#332) 2018-03-24 10:58:42 +01:00
gwenn
b1e0fe2253 New change and new contributor 2018-03-24 10:41: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
ee9ecf0636 Update Changelog 2018-03-24 07:38:40 +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
63d8c3e852 Prepare next release 2018-03-24 07:23:01 +01:00
gwenn
c11229e0c5
Merge pull request #327 from gwenn/3.22.0
Update to latest version of SQLite3 3.22.0 #326
2018-03-24 04:00:58 +01:00
gwenn
9bdc18d4c0 Fix typo 2018-03-24 03:48:09 +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
df68479620
Merge pull request #333 from gwenn/deps.rs
Add deps.rs badge
2018-03-24 03:09:51 +01:00
gwenn
64d401ba19
Merge pull request #322 from traviscross/improvement/add-comment-about-mut-connection
Add comment to justify `&mut Connection` in `Transaction`
2018-03-24 03:04:42 +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
5bd1bd2c60 Add deps.rs badge 2018-02-17 10:24:18 +01:00
gwenn
87d97b143e Fix upgrade script
Avoid cleaning the whole target dir
2018-02-10 11:11:51 +01:00
gwenn
08cda05406 Update to latest version of SQLite3 3.22.0 #326
Upgrade to bindgen 0.32
Add a shell script to upgrade bundled SQLite version
Upgrade bundle SQLite to 3.22.0
Upgrade libsqlite3-sys version to 0.9.2
2018-02-10 11:04:02 +01:00
gwenn
c10c4edb84 Upgrade to csv 0.15 2018-01-27 10:36:24 +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
402d5340d5 Patch release of libsqlite3-sys to remove crates.io keyword 2017-12-05 18:05:51 -05:00
John Gallagher
94febda05a
Merge pull request #311 from jgallagher/clippy-warnings
Fix handful of clippy warnings.
2017-12-05 18:05:02 -05:00
John Gallagher
20c86dd2a1
Merge pull request #315 from sgrif/sg-keyword-cleanup
Remove the database keyword/category from libsqlite3-sys
2017-12-05 18:04:43 -05:00
Sean Griffin
b553a214c8 Remove the database keyword/category from libsqlite3-sys
Currently `libsqlite3-sys` is the first result for both the "database"
keyword, and the "Database interfaces" category. This makes sense, as it
is a dependency of both Diesel and rusqlite. However, this library is
not intended to be used directly. While it can technically be called a
database interface, FFI is clearly the category that applies more than
anything else. Someone browsing this keyword or category is likely
looking for a Rust library they can use, not a C one.
2017-12-03 14:22:01 -07:00
John Gallagher
4bfbb5f1fe Fix handful of clippy warnings. 2017-11-17 11:37:23 -07:00
John Gallagher
5f180c5a95 Add sqlcipher feature to README. 2017-11-13 15:59:56 -07:00
John Gallagher
20ee7c6841 Fix 0.13.0 release date in Changelog 2017-11-13 15:57:34 -07:00
John Gallagher
a3bec58c96 Bump to v0.13.0. 2017-11-13 15:55:48 -07:00
John Gallagher
e1401359df
Merge pull request #309 from jgallagher/gwenn-doc-rs
Update doc links to docs.rs
2017-11-13 15:55:20 -07:00
John Gallagher
f28df22a70 Add limits feature to docs.rs metadata. 2017-11-13 15:50:59 -07:00