Commit Graph

121 Commits

Author SHA1 Message Date
gwenn
2e07650a02 Use ?NNN format instead of ?
https://sqlite.org/lang_expr.html#parameters
> But because it is easy to miscount the question marks, the use of this parameter format is discouraged. Programmers are encouraged to use one of the symbolic formats below or the ?NNN format above instead.
2022-11-27 09:38:06 +01:00
gwenn
784ef95bb6 Intoduce one_column for tests 2022-11-11 16:20:39 +01:00
gwenn
7dab08c4b2 Fix clippy warnings 2022-10-02 11:34:58 +02:00
gwenn
6766d6a6cd Remove old_sqlite feature
And associated bindgen_3.6.8.rs
2022-08-30 13:05:47 -07:00
gwenn
6e740d0611 Change default minimal SQLite API version
From 3.6.8 to 3.14.0.
Use `old_sqlite` feature to keep 3.6.8 (or 3.7.16) as the minimal version.
Use `modern_sqlite` for SQLite API > 3.14.0.
Also remove old 3.6.23 and 3.7.7 bindings.
2022-08-30 13:05:47 -07:00
heavenboy8
569b19c160 update code to fit the last rust version requirements 2022-08-17 08:28:12 +02:00
gwenn
d5110ced91 Fix clippy warnings 2022-07-31 07:00:37 +02:00
gwenn
618e9a1274 Clean code
Typos, deprecated code usages, ...
2022-05-29 13:33:51 +02:00
gwenn
8370970b0b Keep track of SQL input 2022-04-21 15:14:08 +02:00
gwenn
cfcbb56fce Merge remote-tracking branch 'origin/master' into error_offset
# Conflicts:
#	src/statement.rs
2022-04-20 07:27:05 +02:00
Thom Chiovoloni
46def6d67e Improve the docs for opening the connection a bit 2022-04-03 22:08:50 -07:00
Thom Chiovoloni
899784379b
Expose sqlite3_changes (or sqlite3_changes64 if available) 2022-04-03 08:13:27 -07:00
gwenn
5e2c103a0c
Add some missing wrappers (#1139)
* Add some missing wrappers:

sqlite3_value_subtype
sqlite3_result_subtype
sqlite3_changes64
sqlite3_db_readonly
sqlite3_txn_state
sqlite3_stmt_isexplain
sqlite3_vtab_config
sqlite3_index_info.idxFlags
sqlite3_index_info.colUsed
sqlite3_index_info.idxStr
sqlite3_vtab_collation

* Mark series VTab as innocuous and csv as direct only
2022-03-17 19:58:02 +01:00
gwenn
69a40526d5 Introduce SqlInputError with offset 2022-03-13 17:31:07 +01:00
Thom Chiovoloni
2ec0b2e8fe Implement Params for tuples of ToSql up to size 16, and touch up docs 2022-03-10 13:07:06 -08:00
gwenn
65668a46e4 Add constants introduced by SQLite 3.38.0
SQLITE_STMTSTATUS_FILTER_MISS
SQLITE_STMTSTATUS_FILTER_HIT
SQLITE_INDEX_CONSTRAINT_LIMIT
SQLITE_INDEX_CONSTRAINT_OFFSET
2022-02-26 09:55:17 +01:00
gwenn
43591154b2 clippy:ptr_as_ptr 2022-01-05 19:50:25 +01:00
gwenn
30f8c8c502 Fix callbacks lifetime 2021-12-01 04:28:09 -08:00
gwenn
ce90b519bb Fix clippy warnings 2021-10-01 20:09:48 +02:00
Toby Murray
8a88ba647c 'restricts' -> 'restrictions' 2021-09-23 06:49:58 -07:00
gwenn
dcaa67a617
Merge pull request #973 from gwenn/doc_cfg
Use #[doc(cfg)]
2021-06-30 18:07:54 +02:00
gwenn
5730b2f952 Fix clippy warnings 2021-06-25 18:57:25 -07:00
gwenn
0312937d6a Use #[doc(cfg)]
Fix #835
2021-06-13 09:17:35 +02:00
gwenn
cd40cc330b
Rustfmt (#956) 2021-05-07 19:39:53 +02:00
Dirk Stolle
c33d6bfad3 fix several typos 2021-05-02 23:03:10 -07:00
Nick Hynes
b8b1138fcf Add Statement::parameter_name 2021-04-26 01:16:10 -07:00
gwenn
c4b398f468
Doctest column name reference (#918)
* Doctest column name reference
* Document rusqlite assumption on column name reference
And move doctest as a test.
* Document when columns metadata should be extracted.
* Rustfmt doc (wrap_comments)
2021-04-03 11:03:50 +02:00
gwenn
e1eed94bef Fix clippy warnings
Allow `unnecessary_wraps` for `check_update` and `check_no_tail`.
Remove `check_readonly` (`sqlite3-parser` may help).
2021-02-28 13:19:58 +01:00
Thom Chiovoloni
19b0772f3f Make it clear bind_in is not public, and inline functions passing large arrays by value to avoid too much copying 2021-01-31 16:18:48 -08:00
gwenn
afcdc2b43a Use most concise syntax for params 2021-01-19 21:16:08 +01:00
gwenn
6fae5d6641 Add/fix rustdoc links 2020-11-22 09:34:03 +01:00
kud1ing
7beba0c6eb Document that optional() requires import of rusqlite::OptionalExtension
Document that `optional()` requires import of `rusqlite::OptionalExtension`.
2020-11-20 18:09:47 -08:00
gwenn
0649df96ea Fix non-autolinks warnings 2020-11-07 12:32:41 +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
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
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
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
f37519ad51 Replace execute_batch usages by execute
Because execute_batch does not support unlock_notify
2020-06-25 09:45:49 -07:00
Thom Chiovoloni
f7a573e44a Don't implement Into<RawStatement> for Statement 2020-06-07 19:18:46 -07: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
ceb9f11de8 Replace pub(crate) by pub(super) visibilty 2020-05-16 10:18:25 +02:00
Thom Chiovoloni
418ef10af2 Add a wrapper for strings allocated on sqlite heap 2020-04-16 08:21:43 -07:00
Thom Chiovoloni
9322b0e881 Update links & copyright statement 2020-04-15 21:37:39 -07:00
Thom Chiovoloni
552416039e Optimize named params via caching and use of smallvec 2020-04-14 10:26:41 -07:00
Thom Chiovoloni
cf9b6e9ae2 Avoid relying on sqlite to justify str::from_utf8_unchecked 2020-04-14 09:31:29 -07:00
gwenn
611c8e8b02 Rustfmt 2020-04-11 22:18:22 -07:00
Thom Chiovoloni
53c99f940e Fix up conventions around unsafe in internal functions 2020-04-07 10:04:18 -07:00