Struct odbc_api::Prepared [−][src]
pub struct Prepared<'open_connection> { /* fields omitted */ }
Expand description
A prepared query. Prepared queries are useful if the similar queries should executed more than once.
Implementations
pub fn execute(
&mut self,
params: impl ParameterCollection
) -> Result<Option<CursorImpl<&mut StatementImpl<'o>>>, Error>
pub fn execute(
&mut self,
params: impl ParameterCollection
) -> Result<Option<CursorImpl<&mut StatementImpl<'o>>>, Error>
Execute the prepared statement.
params
: Used to bind these parameters before executing the statement. You can use()
to represent no parameters. In regards to binding arrays of parameters: Shouldparams
specify a parameter set size of0
, nothing is executed, andOk(None)
is returned. See thecrate::parameter
module level documentation for more information on how to pass parameters.
Describes parameter marker associated with a prepared SQL statement.
Parameters
parameter_number
: Parameter marker number ordered sequentially in increasing parameter order, starting at 1.
Trait Implementations
type Statement = StatementImpl<'o>
type Statement = StatementImpl<'o>
Statement type of the cursor. This is always an instantiation of
crate::handles::Statement
with a generic parameter indicating the lifetime of the
associated connection. Read more
Get a shared reference to the underlying statement handle. This method is used to implement
other more high level methods like Self::describe_col
on top of it. It is usually not
intended to be called by users of this library directly, but may serve as an escape hatch
for low level usecases. Read more
fn describe_col(
&self,
column_number: u16,
column_description: &mut ColumnDescription
) -> Result<(), Error>
fn describe_col(
&self,
column_number: u16,
column_description: &mut ColumnDescription
) -> Result<(), Error>
Fetch a column description using the column index. Read more
Number of columns in result set. Can also be used to see wether execting a prepared
Statement (crate::Prepared
) would yield a result set, as this would return 0
if it
does not. Read more
true
if a given column in a result set is unsigned or not a numeric type, false
otherwise. Read more
Returns the size in bytes of the columns. For variable sized types the maximum size is returned, excluding a terminating zero. Read more
Maximum number of characters required to display data from the column. Read more
Precision of the column. Read more
The applicable scale for a numeric data type. For DECIMAL and NUMERIC data types, this is the defined scale. It is undefined for all other data types. Read more
The column alias, if it applies. If the column alias does not apply, the column name is returned. If there is no column name or a column alias, an empty string is returned. Read more
Use this if you want to iterate over all column names and allocate a String
for each one. Read more