mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-22 16:29:20 +08:00
Add constants introduced by SQLite 3.38.0
SQLITE_STMTSTATUS_FILTER_MISS SQLITE_STMTSTATUS_FILTER_HIT SQLITE_INDEX_CONSTRAINT_LIMIT SQLITE_INDEX_CONSTRAINT_OFFSET
This commit is contained in:
parent
af152b410d
commit
65668a46e4
@ -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
|
||||
|
@ -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,
|
||||
}
|
||||
|
@ -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`.
|
||||
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user