Commit Graph

2191 Commits

Author SHA1 Message Date
Oliver Wangler
203bbb6fe2
Update README.md 2020-07-29 11:00:03 +02:00
Nikhil Benesch
b83d22e2b7 Upgrade to time v0.2 and put it behind a feature flag
This also removes the usage of time in the crate's top-level
documentation example, as was done for the README in #625.

Fix #653.
2020-07-24 11:28:19 -07:00
Tjeu Kayim
464b8283b2 Add feature flag to include wasm32-wasi-vfs.c 2020-07-24 10:34:00 -07:00
Tjeu Kayim
1483f1cdf5 Support wasm32-wasi target 2020-07-24 10:34:00 -07:00
Sergey Duck
c00471197a Add cross-compilation with mingw 2020-07-04 03:30:32 -07:00
Tim
83c038107d Fix order of parameters in InvalidParameterCount message
This prints a message like `Error: Wrong number of parameters passed to query. Got 7, needed 8`, but the numbers were the wrong way around - i.e. it should have printed `Got 8, needed 7` in this case.
2020-07-01 08:38:50 -07:00
Thom Chiovoloni
f79a9ca3ef Publically expose Map 2020-06-29 09:36:13 -07:00
gwenn
024e2e6bf0
Merge pull request #773 from gwenn/execute_batch
Implement our own sqlite3_exec
2020-06-28 06:18:56 +02:00
gwenn
3cea0c7af5 Benchmark execute vs execute_batch 2020-06-27 09:54:33 +02:00
gwenn
0b948d83da
Merge pull request #772 from gwenn/clippy
Clippy
2020-06-27 07:18:39 +02:00
gwenn
dd886578d2 Implement our own sqlite3_exec
Should fix issue related to unlock notify: #767
Caveat: many CString allocated.
2020-06-26 19:35:14 +02:00
gwenn
4114c94585 Clippy 2020-06-26 19:22:20 +02:00
gwenn
57db338537 Rustfmt 2020-06-25 09:45:49 -07:00
gwenn
f37519ad51 Replace execute_batch usages by execute
Because execute_batch does not support unlock_notify
2020-06-25 09:45:49 -07:00
Dubiousjim
a9b700c841 sys/build.rs: LIBSQLITE3_FLAGS hook
Enables compiling bundled sources with different flags.
Env variable name modeled after LIBSQLITE3_SYS_BUNDLING.
May want to println!("cargo:warning=...") instead of panicking.
2020-06-25 09:45:34 -07:00
Dubiousjim
32df49ca34 sys/build.rs: fix comment about {}_STATIC 2020-06-25 09:45:34 -07:00
Dubiousjim
4504eb0ae0 sys/build.rs: SQLITE_HAVE_ISNAN -> HAVE_ISNAN
SQLite treats these flags equivalently. Omitting the SQLITE_ prefix to
be more like HAVE_USLEEP, HAVE_LOCALTIME_R.
2020-06-25 09:45:34 -07:00
Dubiousjim
db64b8dfb0 sys/Cargo.toml: preupdate_hook, session require buildtime_bindgen
We add an explicit "buildtime_bindgen" to the "session" feature, rather
than just relying on the transitive "session" -> "preupdate_hook" ->
"buildtime_bindgen", to proof against possible future changes.
2020-06-25 09:45:34 -07:00
Thom Chiovoloni
1c9e381a21 Clippy fixes 2020-06-07 19:18:46 -07:00
Thom Chiovoloni
f7a573e44a Don't implement Into<RawStatement> for Statement 2020-06-07 19:18:46 -07:00
gwenn
6b4f207dc1
Merge pull request #759 from gwenn/3.32.2
Upgrade bundled sqlite to 3.32.2
2020-06-06 07:06:52 +02:00
gwenn
57e737f418 Try to fix Clippy warnings 2020-06-05 19:25:45 +02:00
gwenn
870290c64d Upgrade bundled sqlite to 3.32.2 2020-06-05 19:16:51 +02:00
Thom Chiovoloni
6058322cca Set codecov to informational mode. Fixes #725 2020-06-05 04:21:05 -07:00
Thom Chiovoloni
e3310b980d Disable RUST_BACKTRACE when running sanitizers.
This is an attempt to work around rust-lang/rust#59125.

Fixes #729
2020-06-05 04:21:05 -07:00
gwenn
f04b4b62b9
Merge pull request #757 from gwenn/iterators_doc
Try to explain why we need a map function
2020-06-03 19:04:51 +02:00
gwenn
7b08dc9ad5 Try to explain why we need a map function
To tranform the fallible streaming iterator.
2020-06-02 19:05:09 +02:00
gwenn
bb34f3fec8
Merge pull request #755 from gwenn/lifetime_elision
Lifetime elision
2020-06-02 18:21:13 +02:00
gwenn
c577a9d801 Lifetime elision 2020-06-01 18:44:02 +02:00
gwenn
52a80f95f7
Merge pull request #754 from gwenn/phantom_data
Fix some PhantomData declarations
2020-06-01 11:48:02 +02:00
gwenn
4e6dc91fc0
Merge pull request #753 from gwenn/vtab_cursor_lifetime
VTabCursor lifetime should be bound to VTab lifetime
2020-06-01 11:47:23 +02:00
gwenn
265020e589 Fix some PhantomData declarations
Specify the expected type instead of () even if only the lifetime
matters
2020-06-01 10:11:34 +02:00
gwenn
2af75d1f13 VTabCursor lifetime should be bound to VTab lifetime
```c
struct sqlite3_vtab_cursor {
  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
```
It seems that we need to introduce a lifetime on `VTab` trait
to express such constraint:
https://users.rust-lang.org/t/associated-type-with-lifetime-bound/7256
But there may be another/new way to do it.
2020-06-01 09:48:49 +02:00
gwenn
48a15857fb
Merge pull request #752 from Dushistov/omit-decltype
adding ability to work with sqlite compiled with -DSQLITE_OMIT_DECLTYPE
2020-06-01 07:28:17 +02:00
Evgeniy A. Dushistov
d16748ac9f adding ability to work with sqlite compiled with -DSQLITE_OMIT_DECLTYPE
fix #751
2020-06-01 06:31:27 +03:00
Evgeniy A. Dushistov
8cdfaf36ae little speedup for bundled sqlite3.c 2020-05-29 17:02:37 -07:00
gwenn
c1142c309e Upgrade to bindgen 0.54 2020-05-29 17:02:16 -07:00
gwenn
f7b60d866d
Merge pull request #743 from gwenn/rows_doc
Document Rows::map and FallibleStreamingIterator impl
2020-05-25 19:53:51 +02:00
Thom Chiovoloni
9b3805a26b Add doctest variant of the most full --feature set in CI 2020-05-24 12:21:33 -07:00
gwenn
8cb5b2e585 Document Rows::map and FallibleStreamingIterator impl
See
https://www.reddit.com/r/rust/comments/gov817/rusqlite_only_getting_ok_entries_from_query_map/
```
let mut stmt = self
    .db
    .prepare("SELECT tag FROM tags WHERE tags.entry_id = ?1")?;

let tags = stmt.query(params![id])?;

tags
    .map(|res| res.get(0))
    .collect()
```
2020-05-24 20:53:52 +02:00
Voodlaz
dbd1e0bb85 Update README.md 2020-05-21 09:08:39 -07:00
Voodlaz
d5ed10f306 Update README.md 2020-05-21 09:08:39 -07:00
gwenn
e664f82630 Add still missing docs in session module 2020-05-21 00:48:06 -07:00
gwenn
5ebba26a7e Add missing docs in session module 2020-05-21 00:48:06 -07:00
gwenn
76fc22c653 Fix missing docs 2020-05-21 00:48:06 -07:00
Martin Habovstiak
8a08dff115 Clippy reports redundant closures even in cases in which removing the
closure is impossible. See
https://github.com/rust-lang/rust-clippy/issues/5594

Allow this lint until the issue is resolved in clippy or the compiler.
2020-05-21 00:47:52 -07:00
Martin Habovstiak
c5b2efc099 impl TryFrom<&Row<'_>> for (...)
This change implements `TryFrom<&Row>` for tuples up to 16 fields. This
is a convenience function that can be used to map rows more easily.

The change includes tests for 1-tuple, 2-tuple and 16-tuple.
2020-05-21 00:47:52 -07:00
Thom Chiovoloni
aabcce9aa6 Add link to gitter channel. Fixes #736 2020-05-19 18:52:54 -07:00
gwenn
5565ae5629
Merge pull request #735 from gwenn/extended_result_codes
Activate extended result codes asap
2020-05-17 09:53:25 +02:00
gwenn
0dd01e999d
Merge pull request #733 from gwenn/visibility
Replace pub(crate) by pub(super) visibilty
2020-05-17 09:52:56 +02:00