gwenn
df02910660
Implement AsRef<Statement> for Row(s) ( #887 )
2021-05-26 14:51:28 +02:00
gwenn
1985e78fa6
Fix clippy warnings ( #959 )
...
Fix clippy warnings
2021-05-13 08:58:46 +02:00
Dirk Stolle
c33d6bfad3
fix several typos
2021-05-02 23:03:10 -07:00
gwenn
6c956bb270
Test that extra_check feature works with RETURNING statements ( #932 )
...
Test that extra_check feature works with RETURNING statements
2021-04-04 12:47:21 +02:00
gwenn
afcdc2b43a
Use most concise syntax for params
2021-01-19 21:16:08 +01:00
gwenn
e154ccb606
Rename get_raw to get_ref_unwrap and get_raw_checked to get_ref ( #838 )
...
* test `From<FromSqlError> for Error`
* Rename get_raw to get_ref_unwrap and get_raw_checked to get_ref
2020-12-22 21:34:30 +01:00
gwenn
32ee895b63
Remove some usages of params! / NO_PARAMS
2020-11-22 09:37:00 +01:00
gwenn
bbd1ff5fb0
Try to fix CI build
2020-11-05 22:24:55 +01:00
gwenn
549ceb59e2
Try to fix CI build
2020-11-05 22:21:02 +01:00
gwenn
da94f8eba6
Make tests return Result
2020-11-05 22:14:00 +01:00
Thom Chiovoloni
65c38bf813
Add #[inline]
and #[cold]
in far more places
2020-11-04 07:59:23 -08:00
Thom Chiovoloni
a312582d11
Ensure empty array Params impl can trigger Error::InvalidParameterCount when needed
2020-11-03 19:09:19 -08:00
Thom Chiovoloni
22121772a2
Deprecate NO_PARAMS in favor of passing an empty array
2020-11-03 19:09:19 -08:00
Thom Chiovoloni
2461ebf62f
Update documentation
2020-11-03 19:09:19 -08:00
Thom Chiovoloni
032aea73b8
Overhaul query API, removing the need for the _named
variants of all functions, and rusqlite::NO_PARAMS
2020-11-03 19:09:19 -08:00
gwenn
1103febb1e
Test Batch iterator
2020-10-31 11:11:12 +01:00
gwenn
f3c2b63836
Get rid of fallible iterator trait
2020-10-31 10:47:44 +01:00
gwenn
73323b6b92
Remove Iterator implementation for Batch
...
If Batch implements both `Iterator` and `FaillibleIterator`, `next`
method is ambiguous and must be qualified...
2020-10-29 20:06:47 +01:00
gwenn
b73ca079a8
Implement Iterator for Batch
2020-10-29 20:01:46 +01:00
gwenn
d1ec46182f
Fix Clippy warning
2020-10-28 21:26:36 +01:00
gwenn
5ce81024c8
Introduce Batch fallible iterator
2020-10-28 21:10:13 +01:00
gwenn
a4691db6d0
pragma_update fails with ExecuteReturnedResults
...
Ideally, while executing a batch, we should fail if it contains a SELECT
statement. But currently there is no way to make the distinction between
a SELECT and a PRAGMA which both updates and returns a row.
So we fail only when `extra_check` feature is activated.
2020-08-17 19:30:24 +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
Thom Chiovoloni
f79a9ca3ef
Publically expose Map
2020-06-29 09:36:13 -07: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
76fc22c653
Fix missing docs
2020-05-21 00:48:06 -07:00
Thom Chiovoloni
9322b0e881
Update links & copyright statement
2020-04-15 21:37:39 -07:00
Thom Chiovoloni
ac30e169ae
Use SmallCString in most places
2020-04-14 10:26:41 -07:00
Thom Chiovoloni
552416039e
Optimize named params via caching and use of smallvec
2020-04-14 10:26:41 -07:00
Konrad Borowski
c8078dfd1f
Allow non-Unicode file names on Unix-like platforms
2020-04-09 10:35:38 +02:00
Thom Chiovoloni
ca13698273
Revert "Merge pull request #499 from xfix/unix-invalid-unicode"
...
This reverts commit 061748e1f5
, reversing
changes made to cf3cdecf12
.
2020-04-08 10:38:32 -07:00
Thom Chiovoloni
061748e1f5
Merge pull request #499 from xfix/unix-invalid-unicode
...
Allow non-Unicode file names on Unix-like platforms
2020-04-08 10:30:50 -07:00
Thom Chiovoloni
8f7fc7d976
Avoid using MaybeUninit for pointers
2020-04-07 10:04:18 -07:00
Thom Chiovoloni
d35dd0e99f
Allow optionally passing an Error parameter to rusqlite::Result
( #678 )
2020-04-06 14:43:06 -07:00
Thom Chiovoloni
6617db59fb
Document which features are required, and add vtab usage examples ( #669 )
2020-04-05 22:15:27 -07:00
gwenn
f71ea05603
Handle text with internal nuls
...
Fix insertion and selection (#657 ).
2020-03-25 19:20:05 +01:00
gwenn
8ddacbb27c
doctest README.md
2020-03-08 15:36:56 +01:00
gwenn
97b2f4cda0
Fix test_execute_select
2020-03-04 20:42:32 +01:00
gwenn
1fb00e99b7
Fix error while executing ALTER statement
...
`execute_bacth` should be used for DDL.
`execute` should still work except when `extra-check` feature is
activated.
2020-03-04 20:26:31 +01:00
gwenn
15fc3b4b71
Clippy + rust fmt
2020-02-22 11:50:00 +01:00
gwenn
406cd6d2cf
Merge pull request #630 from gwenn/pr/open-with-vfs
...
add ability to open sqlite connection with specified vfs
2020-02-09 12:54:45 +01:00
gwenn
7d1d6024e9
Factorize code
2020-02-09 12:21:20 +01:00
gwenn
4d58a43b38
Fix compilation errors
2020-02-09 12:08:25 +01:00
gwenn
9e17a0b28e
Merge remote-tracking branch 'upstream/master' into pr/open-with-vfs
...
# Conflicts:
# src/inner_connection.rs
2020-02-09 11:58:49 +01:00
gwenn
922228f604
Fix clippy warnings
2020-02-09 11:48:08 +01:00
gwenn
05e87b8d8d
Add missing constants
2020-02-09 11:47:01 +01:00
gwenn
5565d2e058
Add support to function flags ( #622 )
...
Breaking changes
2020-01-26 18:11:11 +01:00
gwenn
adb904650d
Fix warnings related to deprecated Error::description
2020-01-26 16:57:58 +01:00
gwenn
d1813caa1d
Merge pull request #617 from gwenn/params
...
Fix params macro
2020-01-18 19:29:14 +01:00
gwenn
f8991082da
Fix params macro
...
See #614
2020-01-18 19:04:28 +01:00
Thom Chiovoloni
c70d148542
Remove most of the code using feature=bundled
as a version check
2020-01-14 08:11:36 -08:00
Steven Roose
c162a4516c
Replace deprecated tempdir with tempfile
...
This also removes one dependency on the winapi crate. The current
version of the time crate also depends on winapi, but work is being done
to replace that version with 0.2 to remove the winapi dependency.
2019-11-22 11:12:53 +00:00
gwenn
8302a50fb8
Fix clippy warnings
2019-11-03 11:19:07 +01:00
gwenn
317abe6155
Update README example
2019-11-01 18:27:56 +01:00
gwenn
edfd7658c3
Segmentation fault on prepare_cached
with an empty query
...
With an empty query is prepared, sqlite3 returns no error but a null pointer.
And then `sqlite3_sql` returns null.
Which make `CStr::from_ptr` crash.
2019-10-29 19:24:18 +01:00
gwenn
15f356e5a7
Merge remote-tracking branch 'jgallagher/master' into cant-open
2019-10-19 10:40:53 +02:00
gwenn
6c838bf544
Ignore test_execute_multiple when no extra check
2019-08-31 09:39:09 +02:00
gwenn
c6a5fd402c
Merge remote-tracking branch 'jgallagher/master' into tail
2019-08-31 09:30:25 +02:00
gwenn
bcd26ca062
Merge remote-tracking branch 'jgallagher/master' into tail
...
# Conflicts:
# src/inner_connection.rs
# src/lib.rs
2019-08-26 20:41:15 +02:00
gwenn
00d50199a2
Check SQL query passed to execute
...
When `extra_check` feature is activated:
Fail when query has a column count > 0
Or when query is readonly.
2019-08-26 20:21:23 +02:00
gwenn
08e32444c9
Cleanup use statements
2019-08-17 08:18:37 +02:00
gwenn
28a48ec7c1
Check OpenFlags
2019-08-17 08:16:47 +02:00
gwenn
d229f0f9e9
Remove #[macro_use] attribute when importing macros
2019-08-09 20:01:44 +02:00
gwenn
f0ae7b6e9b
Do not assume sqlite3_column_text
is valid UTF-8.
...
Fix Statement::value_ref
2019-07-24 20:08:31 +02:00
gwenn
208f3c084b
Clippy: fix warnings
2019-07-10 21:10:12 +02:00
Thom Chiovoloni
4356f5a176
Include the name of the column in InvalidColumnType errors
2019-06-25 12:20:11 -07:00
gwenn
147168184f
rustdoc: example for Connection::open file
2019-06-24 20:05:36 +02:00
gwenn
bb7ae7f215
Add binding to sqlite3_create_collation_v2
2019-06-17 19:20:53 +02:00
Joshua C. Randall
1ae02726cf
add ability to open with specified vfs
2019-06-17 10:42:54 +01:00
gwenn
031bffffa5
Add query_row_named for prepared statement.
2019-06-12 19:18:57 +02:00
Thom Chiovoloni
d8074b1ece
impl ToSql for Box<dyn ToSql>. Fixes #500
2019-03-27 19:36:11 -07:00
Konrad Borowski
f5072b8e0f
Allow non-Unicode file names on Unix-like platforms
2019-03-26 10:20:22 +01:00
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
e8e76852bd
Merge remote-tracking branch 'jgallagher/master' into tail
2019-02-02 13:22:40 +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