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.
This commit is contained in:
gwenn
2022-11-27 09:38:06 +01:00
parent 69b3367c29
commit 2e07650a02
18 changed files with 85 additions and 85 deletions

View File

@@ -211,7 +211,7 @@ impl Connection {
/// (e.g. `integrity_check`).
///
/// Prefer [PRAGMA function](https://sqlite.org/pragma.html#pragfunc) introduced in SQLite 3.20:
/// `SELECT * FROM pragma_table_info(?);`
/// `SELECT * FROM pragma_table_info(?1);`
pub fn pragma<F, V>(
&self,
schema_name: Option<DatabaseName<'_>>,
@@ -379,7 +379,7 @@ mod test {
#[cfg(feature = "modern_sqlite")]
fn pragma_func() -> Result<()> {
let db = Connection::open_in_memory()?;
let mut table_info = db.prepare("SELECT * FROM pragma_table_info(?)")?;
let mut table_info = db.prepare("SELECT * FROM pragma_table_info(?1)")?;
let mut columns = Vec::new();
let mut rows = table_info.query(["sqlite_master"])?;