pub struct PreparedStatement<'conn> { /* private fields */ }Implementations§
Source§impl PreparedStatement<'_>
impl PreparedStatement<'_>
Sourcepub fn is_dml(&self) -> bool
pub fn is_dml(&self) -> bool
Returns true if this prepared statement is a DML statement
(INSERT/UPDATE/DELETE).
Sourcepub fn query_with_params(&self, params: &[SqliteValue]) -> Result<Vec<Row>>
pub fn query_with_params(&self, params: &[SqliteValue]) -> Result<Vec<Row>>
Execute as a query with bound SQL parameters (?1, ?2, …).
Sourcepub fn query_row_with_params(&self, params: &[SqliteValue]) -> Result<Row>
pub fn query_row_with_params(&self, params: &[SqliteValue]) -> Result<Row>
Execute as a query with parameters and return exactly one row.
Sourcepub fn column_count(&self) -> usize
pub fn column_count(&self) -> usize
Return the number of columns this statement will produce per row.
Sourcepub fn column_names(&self) -> &[String]
pub fn column_names(&self) -> &[String]
Return best-effort result column labels inferred at prepare time.
Sourcepub fn execute(&self) -> Result<usize>
pub fn execute(&self) -> Result<usize>
Execute and return affected/output row count.
For DML statements (INSERT/UPDATE/DELETE), this delegates to the parent Connection’s execution pipeline, which handles triggers, constraints, and autocommit. For SELECT statements, this returns the number of result rows.
Sourcepub fn execute_with_params(&self, params: &[SqliteValue]) -> Result<usize>
pub fn execute_with_params(&self, params: &[SqliteValue]) -> Result<usize>
Execute with bound SQL parameters and return affected/output row count.
For DML statements (INSERT/UPDATE/DELETE), this delegates to the parent Connection’s execution pipeline, which handles triggers, constraints, and autocommit. For SELECT statements, this returns the number of result rows.