143 Commits

Author SHA1 Message Date
gwenn
e025f283f5 Introduce err macro 2024-12-08 17:02:58 +01:00
gwenn
37c50d3f98 Try to fix CI error with sqlcipher 2024-12-07 10:54:07 +01:00
gwenn
d142c00a1c Use sqlite3_errstr
when `sqlite3_errcode` doesn't match result code.
Mostly with SQLITE_MISUSE.
2024-12-06 21:19:42 +01:00
gwenn
4ec54f1a12 unwrap() can be replaced with ? 2024-10-27 14:08:37 +01:00
gwenn
a00acd23a6 Use #[expect(lint)] where possible 2024-09-05 20:51:58 +02:00
gwenn
67d2027162 clippy::doc_markdown 2024-08-10 15:27:19 +02:00
Yuri Astrakhan
c32d7a79a2 Applied some spellchecker suggestions 2024-07-17 13:41:16 -04:00
gwenn
87e324d720 Use CStr::to_str where possible 2024-03-10 11:53:29 +01:00
gwenn
1124d4363d Fix clippy warnings 2024-02-24 11:02:09 +01:00
gwenn
28125461c7
Merge pull request #1160 from gwenn/sub_type
Make possible to specify subtype of SQL function
2024-02-04 10:50:29 +01:00
John Vandenberg
7ce841cd63 Replace intentional typo with typoless equivalent 2024-02-01 17:44:01 +08:00
gwenn
f48c5781a1 Introduce SqlFnArg 2024-01-21 10:22:10 +01:00
gwenn
87d81cd46b Check sqlite3_reset result
https://sqlite.org/c3ref/reset.html
> Therefore, it is important that applications check the return code from sqlite3_reset(S) even if no prior call to sqlite3_step(S) indicated a problem.
2023-11-25 10:13:55 +01:00
gwenn
e2e47de863 Fix some clipy warnings 2023-09-03 10:54:36 +02:00
gwenn
dd05c992c2
Merge pull request #1267 from gwenn/clippy
[breaking change] Update edition from 2018 to 2021
2023-06-17 07:44:02 +02:00
Johnny Graettinger
7c1d5a1863 Add Statement.readonly() accessor
Remove cfg(extra_check) from RawStatement::readonly()
2023-03-23 18:55:19 +00:00
gwenn
ba07f41aac Merge remote-tracking branch 'origin/master' into clippy 2023-03-12 15:49:58 +01:00
gwenn
7278e5fa91
Merge pull request #1250 from gwenn/deprecated
Remove deprecated API
2023-03-12 15:42:58 +01:00
gwenn
5f851fb90f Add Statement::clear_bindings 2022-12-11 10:26:13 +01:00
gwenn
312bf41e90 Merge remote-tracking branch 'origin/master' into deprecated 2022-12-11 09:56:22 +01:00
gwenn
3aa9addaa3 [breaking change] Update edition from 2018 to 2021
And fix clippy warnings
2022-12-09 20:19:04 +01:00
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
d79d4a175b Remove deprecated API 2022-11-11 14:45:22 +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