Commit Graph

384 Commits

Author SHA1 Message Date
gwenn
ceb1ce4a55 Rustfmt 2019-03-19 20:45:04 +01:00
gwenn
4703358866 Fix module visibility 2019-03-19 20:43:40 +01:00
gwenn
38e92159fb Introduce Statement::columns
Return Columns name and type. (#494)
2019-03-19 20:33:36 +01:00
gwenn
71a2004894 Add Rows::map method 2019-03-10 12:58:20 +01:00
gwenn
59a44cfae5 Merge remote-tracking branch 'jgallagher/master' into fallible-iterator 2019-03-10 11:12:14 +01:00
gwenn
d94acdc3f4
Merge pull request #476 from gwenn/pragma
Ease PRAGMA usage (#273 and #265)
2019-02-27 18:03:35 +01:00
Thom Chiovoloni
04f900059d Avoid unnecessary copies/allocations when passing strings to sqlite 2019-02-26 19:47:17 -08:00
gwenn
7be87e950d Merge remote-tracking branch 'jgallagher/master' into pragma 2019-02-21 21:07:18 +01:00
gwenn
6d9ae896b5 Do not panic by default
Replace `Row::get` by `Row::get_checked`,
And rename original `Row::get` to `Row::get_unwrap`.
`Stmt::query_map`, `Stmt::query_map_named`, `Stmt::query_row`,
`Conn::query_row` and `Conn::query_row_named` callback parameter must return a `Result`.
2019-02-21 20:48:09 +01:00
gwenn
1775688ac2
Merge branch 'master' into pragma 2019-02-16 18:52:03 +01:00
gwenn
c1f12c7380 Revert change related to #460 2019-02-16 17:24:56 +01:00
gwenn
d70286e98a Remove unwrap from examples 2019-02-09 07:16:05 +01:00
gwenn
2c1483f2e7 Merge remote-tracking branch 'jgallagher/master' into fallible-iterator 2019-02-09 06:47:57 +01:00
gwenn
7c5bfb7cc3
Merge pull request #475 from gwenn/db-config
Support for sqlite3_db_config #468
2019-02-08 21:38:01 +01:00
gwenn
d93dec52c0 Make Rows implement FallibleStreamingIterator 2019-02-03 14:01:42 +01:00
gwenn
e9896a7734 Lifetime elision in impl 2019-02-03 11:02:38 +01:00
gwenn
9c00dd01a2 Draft to ease PRAGMA usage (#273 and #265) 2019-02-03 09:17:37 +01:00
gwenn
176e4c232b Support for sqlite3_db_config #468 2019-02-02 15:17:20 +01:00
gwenn
c2614b54df Move InnerConnection in its own module 2019-02-02 12:46:52 +01:00
gwenn
8862b17340 Fix clippy warnings 2019-02-02 11:37:26 +01:00
gwenn
4c4578851b Remove needless lifetimes 2019-02-02 11:08:04 +01:00
gwenn
0a46a34e3d Clean examples
Remove `extern crate` usages.
Rustfmt.
2019-01-30 20:14:46 +01:00
gwenn
6e0b1e2751
Merge pull request #471 from thomcc/params-macro
Add params/named_params macro, and expose ToSql from top level
2019-01-30 18:35:41 +01:00
Thom Chiovoloni
d7c8d43fb4 Add params/named_params macro, and expose ToSql from top level 2019-01-29 15:33:57 -08:00
Thom Chiovoloni
9478c490fb Make the libsqlite3_sys as ffi export pub 2019-01-26 14:30:27 -08:00
gwenn
4be7900bab Rustfmt 2019-01-26 11:02:34 +01:00
gwenn
e4c1f541ae Expose sqlite3_changes() #460 2019-01-26 11:01:51 +01:00
gwenn
274ea8aec5 Merge remote-tracking branch 'jgallagher/master' into from_handle 2019-01-26 09:59:00 +01:00
Thom Chiovoloni
ec879337af Add support for querying sqlite_stmt_status 2019-01-24 21:43:39 -08:00
gwenn
dbc4eef657
Session extension (#459)
Session extension bindings
2019-01-13 12:46:19 +01:00
gwenn
92a22b7842 sqlite3_db_filename is available in SQLite >= 3.7.10 2019-01-06 14:01:17 +01:00
gwenn
0042f2514f Introduce Connection::from_handle 2019-01-06 12:58:46 +01:00
gwenn
747a8d36ed
Err partial eq (#452)
Impl PartialEq for Error
2018-12-19 21:58:33 +01:00
gwenn
5c7104c12f Improve doc 2018-12-16 11:55:04 +01:00
gwenn
e0db3d16dd Introduce OptionalExtension
Like in Diesel.
2018-12-16 11:15:21 +01:00
gwenn
d874180333 Rust 2018 idioms 2018-12-07 21:57:04 +01:00
gwenn
bcaa929748 Merge remote-tracking branch 'jgallagher/master' into 2018
# Conflicts:
#	src/lib.rs
#	src/statement.rs
2018-11-05 20:04:04 +01:00
gwenn
ccf52b2daa Replace try! by ? 2018-11-05 19:09:41 +01:00
gwenn
d44203116a
Merge pull request #426 from gwenn/deprecated
Remove deprecated stuff
2018-11-01 11:05:40 +01:00
gwenn
2357acd79e Remove deprecated stuff 2018-11-01 10:30:18 +01:00
gwenn
495f1d529a Clippy 2018-11-01 09:40:56 +01:00
gwenn
1262238229 Rustfmt 2018-10-30 20:15:19 +01:00
gwenn
f04047db01 Rust 2018 2018-10-30 20:15:08 +01:00
gwenn
47d3ac7027 Try to fix test_interrupt #415
Use a scalar function to make sure the interrupt is performed
while the statement is running.
2018-10-28 09:54:30 +01:00
gwenn
1598d4bc30 Rustfmt 2018-10-28 08:51:02 +01:00
gwenn
0d08bf5e05
Merge pull request #411 from thomcc/i128_blob
Add a feature for storing i128 as blobs.
2018-10-19 21:49:09 +02:00
Thom Chiovoloni
3d82f7199a Allow getting a ValueRef out of Row and Context, fixes #259 2018-10-18 12:14:38 -07:00
Joe
e109554819
Remove version check when bundled 2018-10-16 01:30:35 +00:00
Thom Chiovoloni
572471c40f Add a feature for storing i128 as blobs.
This is behind the `i128_blob` feature.

Blobs are stored as 16 byte big-endian values, with their most significant bit
flipped. This is so that sorting, comparison, etc all work properly, even with
negative numbers. This also allows the representation to be stable across
different computers.

It's possible that the `FromSql` implementation should handle the case that the
real value is stored in an integer. I didn't do this, but would be willing to
make the change. I don't think we should store them this way though, since I
don't think users would be able to sort/compare them sanely.

Support for `u128` is not implemented, as comparison with i128 values would work
strangely. This also is consistent with `u64` not being allowed, not that I
think that would be reason enough on it's own.

The `byteorder` crate is used if this feature is flipped, as it's quite small
and implements things more or less optimally. If/when `i128::{to,from}_be_bytes`
gets stabilized (https://github.com/rust-lang/rust/issues/52963), we should
probably use that instead.
2018-10-08 12:22:28 -07:00
gwenn
7176be2d6d
Merge pull request #408 from thomcc/interrupt_handle
Add a method of interrupting a query executing on a separate thread, fixes #407
2018-10-08 18:37:30 +02:00