John Gallagher
2e140d0684
FromSqlError::cause() returns other error's cause directly (possibly None).
2016-12-31 00:36:52 -05:00
John Gallagher
4181441d63
Merge branch 'master' into gwenn-invalid-column-type
2016-12-31 00:35:47 -05:00
gwenn
bc71c58387
Add Statement.query_row convenient method ( #179 )
2016-12-31 00:03:55 -05:00
John Gallagher
08d88177e7
Merge branch 'flush-cache' of https://github.com/gwenn/rusqlite into gwenn-flush-cache
2016-12-30 23:55:19 -05:00
John Gallagher
f17fc14a59
Update query_row_named so its closure also takes a &Row instead of a Row
2016-12-30 23:48:04 -05:00
John Gallagher
3815b6beef
Merge branch 'query_row' of https://github.com/pfernie/rusqlite into pfernie-query_row
2016-12-30 23:42:38 -05:00
John Gallagher
d1ad61dc41
Merge pull request #178 from gwenn/varparam-usage
...
Fix issue #177
2016-12-30 23:38:50 -05:00
John Gallagher
4f5abc705a
Remove workaround for issue fixed in Rust 1.9.
2016-12-30 23:25:21 -05:00
John Gallagher
0d685af2d5
Merge branch 'master' into safe-tosql
2016-12-30 23:18:32 -05:00
gwenn
ffe605150a
Ensure cache is flushed when closing the connection
...
Fix #186
2016-11-04 20:47:28 +01:00
Patrick Fernie
ece7c041e8
change query_row* fns to take Row by reference instead of moving
2016-10-07 12:42:27 -04:00
gwenn
a7d27098b7
Fix issue #177
2016-07-02 10:22:47 +02:00
gwenn
9f05147660
Fix issue jgallagher/rusqlite#174
2016-06-13 20:32:39 +02:00
gwenn
95050f10a8
Add test with empty blob (issue #174 ).
2016-06-13 20:22:21 +02:00
gwenn
e2cf171192
Introduce FromSqlError
as specified by John Gallagher
2016-06-02 21:03:25 +02:00
John Gallagher
58b7aea4f7
Merge branch 'release-0.7' into merge-0.7.3
2016-06-01 21:31:26 -04:00
John Gallagher
ad0b823560
Remove sanity check in insert()
that could return StatementFailedToInsertRow
.
...
This was intended to detect an `UPDATE` query passed to `insert`, but
incorrectly failed if inserts to different tables caused the same row ID
to be returned from both. `UPDATE`s are no longer detectable.
2016-06-01 20:52:22 -04:00
gwenn
91dc30b04d
Simplify InvalidType
2016-05-30 21:20:07 +02:00
gwenn
fb19e718cf
Introduce an intermediary InvalidType error.
...
InvalidType is used where the column/parameter index is not known.
2016-05-30 20:35:56 +02:00
John Gallagher
d43a1abc78
Merge branch 'master' into rust-1.9-reexported-trait-bugfix
2016-05-29 23:54:47 -04:00
John Gallagher
326d8999e8
Merge pull request #169 from jgallagher/deprecated
...
Use new Rust 1.9 attribute: #[deprecated(since = "...", note = "...")]
2016-05-29 23:42:22 -04:00
John Gallagher
b1b438158d
Remove workaround for Rust compiler bug that was fixed in 1.9.
2016-05-29 20:38:46 -04:00
John Gallagher
7c0eba0475
Add since
and note
for all deprecation tags.
2016-05-29 20:36:20 -04:00
gwenn
6a4eacc927
Simply use cargo clippy
2016-05-28 11:16:55 +02:00
gwenn
f817ec86bc
Use new Rust 1.9 attribute: #[deprecated].
2016-05-26 21:16:09 +02:00
gwenn
cabcaf3dcb
Better error reporting on invalid column type.
2016-05-26 21:03:05 +02:00
John Gallagher
bafa85a1a0
Fix clippy warnings.
2016-05-26 00:30:01 -04:00
John Gallagher
f3693a993e
rustfmt
2016-05-26 00:28:18 -04:00
John Gallagher
9a6e17b478
Add doc comments to ToSqlOutput.
2016-05-26 00:14:46 -04:00
John Gallagher
2b830fde2d
Remove pub re-export of FFI helpers from functions
.
2016-05-26 00:14:45 -04:00
John Gallagher
6467815d02
Replace functions::ToResult with ToSql.
2016-05-26 00:14:45 -04:00
John Gallagher
13bff6fab6
Add ToSql impl for bool
.
2016-05-26 00:14:45 -04:00
John Gallagher
9125826534
Move types::Value into its own module.
2016-05-26 00:14:45 -04:00
John Gallagher
e4926ac0d7
Rework ToSql to be implementable without unsafe
.
2016-05-26 00:14:45 -04:00
John Gallagher
8adb96131b
Remove now-unnecessary FFI re-exports.
2016-05-25 19:53:18 -04:00
John Gallagher
2f4990dafd
Rename BorrowedValue -> ValueRef.
2016-05-24 21:34:18 -04:00
John Gallagher
d9df23ca90
Fix doc comment example of FromSql implementation.
2016-05-24 20:12:29 -04:00
John Gallagher
0fbfad2452
Remove functions::FromValue.
...
With the new definition of FromSql, we can reuse it since we can convert
a sqlite3_value into a BorrowedValue.
2016-05-24 20:08:12 -04:00
John Gallagher
4662b9b932
Allow FromSql::<f64> to work on SQLite integer values.
2016-05-24 20:05:32 -04:00
John Gallagher
9d47d5109a
Add doc comments for BorrowedValue and friends.
2016-05-24 19:48:26 -04:00
John Gallagher
734f18c985
Impl From
for converting Value <-> BorrowedValue
2016-05-24 19:36:38 -04:00
John Gallagher
5b0cdbaa56
Redo FromSql to make implementing it not unsafe
.
...
Pass implementers a BorrowedValue instead of relying on them to use
the FFI interface. We take the responsibility of converting the raw
statement and column index into a BorrowedValue.
2016-05-23 21:49:54 -04:00
John Gallagher
c90cd37c00
Add types::BorrowedValue.
2016-05-23 21:48:56 -04:00
John Gallagher
efc6c89370
Add RawStatement::column_type.
2016-05-23 21:46:51 -04:00
John Gallagher
dccfd7e801
Refactor: Extract ToSql into its own module.
2016-05-22 20:16:54 -04:00
John Gallagher
0e96e2269c
Refactor: Extract FromSql into its own module.
2016-05-22 20:01:03 -04:00
John Gallagher
8ce2f5888f
Document CachedStatement::discard.
2016-05-19 20:36:41 -05:00
John Gallagher
dc1b0e39ed
Re-export DropBehavior and SqliteTransactionBehavior.
2016-05-19 20:35:27 -05:00
John Gallagher
d27ed0de63
Re-export Savepoint.
2016-05-19 20:32:17 -05:00
John Gallagher
c4417bee0e
Manual fixes for rustfmt overly long lines.
2016-05-19 20:09:40 -05:00