Merge pull request #1127 from gwenn/consts

Add constants introduced by SQLite 3.38.0
This commit is contained in:
gwenn 2022-02-26 10:31:14 +01:00 committed by GitHub
commit fac235974c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 8 deletions

View File

@ -95,10 +95,10 @@ impl Connection {
/// Make configuration changes to a database connection
///
/// - `SQLITE_DBCONFIG_ENABLE_FKEY`: `false` to disable FK enforcement, `true`
/// to enable FK enforcement
/// - `SQLITE_DBCONFIG_ENABLE_TRIGGER`: `false` to disable triggers, `true` to
/// enable triggers
/// - `SQLITE_DBCONFIG_ENABLE_FKEY`: `false` to disable FK enforcement,
/// `true` to enable FK enforcement
/// - `SQLITE_DBCONFIG_ENABLE_TRIGGER`: `false` to disable triggers, `true`
/// to enable triggers
/// - `SQLITE_DBCONFIG_ENABLE_FTS3_TOKENIZER`: `false` to disable
/// `fts3_tokenizer()`, `true` to enable `fts3_tokenizer()`
/// - `SQLITE_DBCONFIG_NO_CKPT_ON_CLOSE`: `false` (the default) to enable

View File

@ -946,6 +946,10 @@ pub enum StatementStatus {
RePrepare = 5,
/// Equivalent to SQLITE_STMTSTATUS_RUN
Run = 6,
/// Equivalent to SQLITE_STMTSTATUS_FILTER_MISS
FilterMiss = 7,
/// Equivalent to SQLITE_STMTSTATUS_FILTER_HIT
FilterHit = 8,
/// Equivalent to SQLITE_STMTSTATUS_MEMUSED
MemUsed = 99,
}

View File

@ -95,10 +95,10 @@ impl SqliteMallocString {
/// If `s` contains internal NULs, we'll replace them with
/// `NUL_REPLACE_CHAR`.
///
/// Except for `debug_assert`s which may trigger during testing, this function
/// never panics. If we hit integer overflow or the allocation fails, we
/// call `handle_alloc_error` which aborts the program after calling a
/// global hook.
/// Except for `debug_assert`s which may trigger during testing, this
/// function never panics. If we hit integer overflow or the allocation
/// fails, we call `handle_alloc_error` which aborts the program after
/// calling a global hook.
///
/// This means it's safe to use in extern "C" functions even outside of
/// `catch_unwind`.

View File

@ -281,6 +281,8 @@ pub enum IndexConstraintOp {
SQLITE_INDEX_CONSTRAINT_ISNOTNULL, // 3.21.0
SQLITE_INDEX_CONSTRAINT_ISNULL, // 3.21.0
SQLITE_INDEX_CONSTRAINT_IS, // 3.21.0
SQLITE_INDEX_CONSTRAINT_LIMIT, // 3.38.0
SQLITE_INDEX_CONSTRAINT_OFFSET, // 3.38.0
SQLITE_INDEX_CONSTRAINT_FUNCTION(u8), // 3.25.0
}
@ -301,6 +303,8 @@ impl From<u8> for IndexConstraintOp {
70 => IndexConstraintOp::SQLITE_INDEX_CONSTRAINT_ISNOTNULL,
71 => IndexConstraintOp::SQLITE_INDEX_CONSTRAINT_ISNULL,
72 => IndexConstraintOp::SQLITE_INDEX_CONSTRAINT_IS,
73 => IndexConstraintOp::SQLITE_INDEX_CONSTRAINT_LIMIT,
74 => IndexConstraintOp::SQLITE_INDEX_CONSTRAINT_OFFSET,
v => IndexConstraintOp::SQLITE_INDEX_CONSTRAINT_FUNCTION(v),
}
}