Bump sqlite3-parser version

This commit is contained in:
gwenn 2023-04-16 16:17:36 +02:00
parent a927ce1bb6
commit b59b0ddf2e
5 changed files with 9 additions and 8 deletions

View File

@ -497,6 +497,7 @@ mod bindings {
None
}
}
fn item_name(&self, original_item_name: &str) -> Option<String> {
original_item_name
.strip_prefix("sqlite3_index_info_")

View File

@ -12,5 +12,5 @@ categories = ["database"]
proc-macro = true
[dependencies]
sqlite3-parser = { version = "0.5.0", default-features = false, features = ["YYNOERRORRECOVERY"] }
sqlite3-parser = { version = "0.7.0", default-features = false, features = ["YYNOERRORRECOVERY"] }
fallible-iterator = "0.2"

View File

@ -21,7 +21,6 @@ fn try_bind(input: TokenStream) -> Result<TokenStream> {
let (stmt, literal) = {
let mut iter = input.clone().into_iter();
let stmt = iter.next().unwrap();
let _punct = iter.next().unwrap();
let literal = iter.next().unwrap();
assert!(iter.next().is_none());
(stmt, literal)

View File

@ -16,7 +16,7 @@ fn test_literal() -> Result {
let first_name = "El";
let last_name = "Barto";
let mut stmt = Stmt;
__bind!(stmt, "SELECT $first_name, $last_name");
__bind!(stmt "SELECT $first_name, $last_name");
Ok(())
}
@ -24,13 +24,13 @@ fn test_literal() -> Result {
#[test]
fn test_raw_string() {
let stmt = ();
__bind!((), r#"SELECT 1"#);
__bind!(stmt r#"SELECT 1"#);
}
#[test]
fn test_const() {
const SQL: &str = "SELECT 1";
let stmt = ();
__bind!((), SQL);
__bind!(stmt SQL);
}
*/

View File

@ -221,7 +221,7 @@ macro_rules! prepare_and_bind {
#[cfg(trick_rust_analyzer_into_highlighting_interpolated_bits)]
format_args!($sql);
let mut stmt = $conn.prepare($sql)?;
$crate::__bind!(stmt, $sql);
$crate::__bind!(stmt $sql);
stmt
}};
}
@ -233,7 +233,7 @@ macro_rules! prepare_cached_and_bind {
#[cfg(trick_rust_analyzer_into_highlighting_interpolated_bits)]
format_args!($sql);
let mut stmt = $conn.prepare_cached($sql)?;
$crate::__bind!(stmt, $sql);
$crate::__bind!(stmt $sql);
stmt
}};
}
@ -923,7 +923,8 @@ impl Connection {
///
/// This function is unsafe because improper use may impact the Connection.
/// In particular, it should only be called on connections created
/// and owned by the caller, e.g. as a result of calling ffi::sqlite3_open().
/// and owned by the caller, e.g. as a result of calling
/// ffi::sqlite3_open().
#[inline]
pub unsafe fn from_handle_owned(db: *mut ffi::sqlite3) -> Result<Connection> {
let db = InnerConnection::new(db, true);