Commit Graph

520 Commits

Author SHA1 Message Date
John Gallagher
3d654aeed1 Add more documentation for failure modes of functions that return s 2015-12-01 12:05:29 -05:00
John Gallagher
9a4503ad5f Merge pull request #90 from jgallagher/fix-str-error-messages
Fix error messages when failing to convert paths and strings to C-compatible versions
2015-12-01 11:49:37 -05:00
John Gallagher
1af3fcd053 Fix error messages when failing to convert paths and strings to C-compatible versions 2015-12-01 11:47:55 -05:00
John Gallagher
7fbe1172e2 Make libsqlite3-sys's build script slightly more intelligent.
* If SQLITE3_LIB_DIR is present in the environment, we use that.
* If SQLITE3_LIB_DIR is not present, we try to use pkg-config.
* If SQLITE3_LIB_DIR is not present and pkg-config fails, we fall back
  to /usr/lib (if it exists).
2015-12-01 11:36:31 -05:00
John Gallagher
49cb1efe62 Merge branch 'master' into gwenn-trace_extension 2015-12-01 11:13:23 -05:00
John Gallagher
992f01f03b Merge pull request #87 from jgallagher/relax-static-bound-on-query-map
Remove 'static requirement on output of closure given to query_map and query_and_then.
2015-12-01 11:11:59 -05:00
John Gallagher
635616842c Remove 'static requirement on output of closure given to query_map and query_and_then.
The 'static bound was there to prevent callers from being able to save
off the `SqliteRow` handles passed into the closure. This PR changes the
closure to take `&SqliteRow`s instead, which provides the same feature
without restricting the output of the closure.
2015-12-01 10:58:32 -05:00
John Gallagher
86165725de Add krdln to CONTRIBUTORS 2015-12-01 10:45:19 -05:00
John Gallagher
33573fa0f7 Merge pull request #85 from krdln/update-libc
Update Cargo.tomls to libc ~0.2
2015-12-01 10:44:57 -05:00
John Gallagher
cba64a7dee Add trace feature to Changelog 2015-12-01 10:37:01 -05:00
John Gallagher
e6fef5107d Change profile() to take a Rust fn instead of an extern "C" fn. 2015-12-01 10:34:18 -05:00
Michał Krasnoborski
8e31a64dde Update Cargo.tomls to libc ~0.2 2015-12-01 06:18:44 +00:00
John Gallagher
ace5b1ebdc Change trace() to take a Rust fn instead of an extern "C" fn. 2015-11-30 21:08:39 -05:00
John Gallagher
dbfa6ca31f Change config_log to take a Rust fn instead of an extern "C" fn.
Moves the unit test for config_log out of #[ignore] and into its own
test file since it affects the entire process.
2015-11-30 21:08:39 -05:00
John Gallagher
eaf080261b Merge branch 'trace_extension' of https://github.com/gwenn/rusqlite into gwenn-trace_extension 2015-11-30 13:13:43 -05:00
John Gallagher
30ce399e91 Merge pull request #83 from jgallagher/gwenn-debug
Use debug_struct for formatting.
2015-11-30 12:19:28 -05:00
Gwenael Treguier
0729e195c3 Use debug_struct for formatting. 2015-11-30 12:16:09 -05:00
Gwenael Treguier
20c1213482 Remove feature duration. 2015-11-11 15:03:07 +01:00
Gwenael Treguier
a2327fb048 Revert "Remove usage of unstable library feature 'duration'"
This reverts commit 9c415f9c9e.
2015-11-11 15:00:39 +01:00
Gwenael Treguier
4d2d8b43e6 Clean use statement. 2015-11-11 14:45:25 +01:00
Gwenael Treguier
e052053a79 Merge remote-tracking branch 'jgallagher/master' into stmt-cache 2015-11-11 14:42:08 +01:00
Gwenael Treguier
ddd976c158 Cleanup use statements. 2015-11-11 14:39:54 +01:00
Gwenael Treguier
db7345624f Merge remote-tracking branch 'jgallagher/master' into named-param 2015-11-11 14:39:15 +01:00
Gwenael Treguier
50bfba1e1d Ignore test_log. 2015-11-11 14:29:40 +01:00
Gwenael Treguier
8bff40b6d6 Merge remote-tracking branch 'jgallagher/master' into trace_extension 2015-11-11 14:28:21 +01:00
John Gallagher
7586556db5 Add to CONTRIBUTORS 2015-11-03 11:37:23 -05:00
John Gallagher
cd2919cce1 Merge pull request #76 from jgallagher/update-travis-infrastructure
Update to travis CI's container-based infrastructure
2015-11-03 11:35:31 -05:00
John Gallagher
270abfc44f Update to travis CI's container-based infrastructure 2015-11-03 11:33:52 -05:00
John Gallagher
ad80b8fb94 Merge pull request #75 from jgallagher/rfc1214
RFC1214 fix
2015-11-03 11:32:38 -05:00
John Gallagher
78979c44ee Bump version to 0.4.0 2015-11-03 11:29:02 -05:00
John Gallagher
420c4d4d9f Address RFC 1214 warning 2015-11-03 11:27:52 -05:00
John Gallagher
3e8530a364 Merge pull request #71 from jgallagher/gwenn-reset_asap
Reset SQLite statement ASAP after executing.
2015-09-22 10:22:10 -07:00
John Gallagher
b41275cbc8 Update Changelog and Cargo.toml to 0.3.1 2015-09-22 10:18:26 -07:00
John Gallagher
b1350c4c14 Merge branch 'master' into gwenn-reset_asap 2015-09-22 10:16:52 -07:00
John Gallagher
c3bc8b594a Bump version to 0.3.0.
Updates Changelog and CONTRIBUTORS for changes in this version.
2015-09-21 10:39:13 -04:00
John Gallagher
d23667870e Merge pull request #70 from jgallagher/pfernie-master
Replace get_opt with get_checked. Add query_and_then and query_row_and_then.
2015-09-21 10:38:07 -04:00
John Gallagher
7ee69fe103 Remove get_opt (superceded by get_checked). 2015-09-21 10:31:11 -04:00
John Gallagher
1918dc14d0 Add tests for query_row_and_then(). 2015-09-20 21:30:40 -04:00
John Gallagher
072a336b33 Refactor: Reduce duplication across query_and_then tests. 2015-09-20 21:28:50 -04:00
John Gallagher
0cbb2743e3 Merge branch 'master' of https://github.com/pfernie/rusqlite into pfernie-master 2015-09-20 21:07:39 -04:00
John Gallagher
59a3b0ddb5 Merge pull request #62 from gwenn/too-big
Check Rust str length before binding.
2015-09-20 20:57:28 -04:00
John Gallagher
69f68b1347 Merge pull request #69 from jgallagher/gwenn-debug_verbose
Include database path and SQL when debugging SqliteConnection and SqliteStatement
2015-09-20 20:51:17 -04:00
John Gallagher
d07c7ec8a6 Add basic unit test of statement debug including SQL 2015-09-20 20:44:51 -04:00
gwenn
05669082a3 Debug db path and stmt sql. 2015-09-20 20:41:13 -04:00
John Gallagher
43b0c1c98a Merge branch 'reset_asap' of https://github.com/gwenn/rusqlite into gwenn-reset_asap 2015-09-20 20:30:59 -04:00
John Gallagher
36f577aea6 Merge pull request #53 from gwenn/exec_check
Extra check in SqliteStatement.execute
2015-09-20 20:29:12 -04:00
John Gallagher
35160383a6 Merge pull request #68 from huonw/relax
Relax uses of `P: AsRef<...>` from `&P` to `P`.
2015-09-20 20:22:02 -04:00
Huon Wilson
b7efb37b35 Relax uses of P: AsRef<...> from &P to P.
This means that one can pass `AsRef` types directly, without having to
insert a `&`, e.g. `SqliteConnection::open("foo.db")` (new)
vs. `SqliteConnection::open(&"foo.db")` (old).

This should be backwards compatible, since there is an impl in the
standard library:

    impl<'a, T, U> AsRef<U> for &'a T where U: ?Sized, T: AsRef<U> + ?Sized

I.e. the old `&P` satisfies the new bound still. (Taking `P` directly is
what the standard library does with similar functions, like
`File::open`.)
2015-09-08 18:11:50 +10:00
Patrick Fernie
e4eda2041e Implement SqliteConnection::query_row_and_then() 2015-08-27 14:47:48 -04:00
Patrick Fernie
29072e585b Implement SqliteStatement::query_and_then()
Allows for more ergonomic unification of error types
2015-08-27 13:43:43 -04:00