mirror of
https://github.com/isar/rusqlite.git
synced 2025-09-16 20:52:19 +08:00
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.
This commit is contained in:
@@ -796,7 +796,7 @@ impl Statement<'_> {
|
||||
self.conn.decode_result(stmt.finalize())
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "modern_sqlite", feature = "extra_check"))]
|
||||
#[cfg(all(not(feature = "old_sqlite"), feature = "extra_check"))]
|
||||
#[inline]
|
||||
fn check_update(&self) -> Result<()> {
|
||||
// sqlite3_column_count works for DML but not for DDL (ie ALTER)
|
||||
@@ -806,7 +806,7 @@ impl Statement<'_> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(all(not(feature = "modern_sqlite"), feature = "extra_check"))]
|
||||
#[cfg(all(feature = "old_sqlite", feature = "extra_check"))]
|
||||
#[inline]
|
||||
fn check_update(&self) -> Result<()> {
|
||||
// sqlite3_column_count works for DML but not for DDL (ie ALTER)
|
||||
@@ -825,8 +825,8 @@ impl Statement<'_> {
|
||||
|
||||
/// Returns a string containing the SQL text of prepared statement with
|
||||
/// bound parameters expanded.
|
||||
#[cfg(feature = "modern_sqlite")]
|
||||
#[cfg_attr(docsrs, doc(cfg(feature = "modern_sqlite")))]
|
||||
#[cfg(not(feature = "old_sqlite"))]
|
||||
#[cfg_attr(docsrs, doc(cfg(not(feature = "old_sqlite"))))]
|
||||
pub fn expanded_sql(&self) -> Option<String> {
|
||||
self.stmt
|
||||
.expanded_sql()
|
||||
@@ -1407,7 +1407,7 @@ mod test {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "modern_sqlite")]
|
||||
#[cfg(not(feature = "old_sqlite"))]
|
||||
fn test_expanded_sql() -> Result<()> {
|
||||
let db = Connection::open_in_memory()?;
|
||||
let stmt = db.prepare("SELECT ?")?;
|
||||
@@ -1537,7 +1537,7 @@ mod test {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(all(feature = "modern_sqlite", not(feature = "bundled-sqlcipher")))] // SQLite >= 3.38.0
|
||||
#[cfg(feature = "modern_sqlite")] // SQLite >= 3.38.0
|
||||
fn test_error_offset() -> Result<()> {
|
||||
use crate::ffi::ErrorCode;
|
||||
let db = Connection::open_in_memory()?;
|
||||
|
Reference in New Issue
Block a user