Struct rusqlite::functions::Context
[−]
[src]
pub struct Context<'a> { /* fields omitted */ }
Context is a wrapper for the SQLite function evaluation context.
Methods
impl<'a> Context<'a>
[src]
fn len(&self) -> usize
[src]
Returns the number of arguments to the function.
fn is_empty(&self) -> bool
[src]
Returns true
when there is no argument.
fn get<T: FromSql>(&self, idx: usize) -> Result<T>
[src]
Returns the idx
th argument as a T
.
Failure
Will panic if idx
is greater than or equal to self.len()
.
Will return Err if the underlying SQLite type cannot be converted to a T
.
fn set_aux<T>(&self, arg: c_int, value: T)
[src]
Sets the auxilliary data associated with a particular parameter. See https://www.sqlite.org/c3ref/get_auxdata.html for a discussion of this feature, or the unit tests of this module for an example.
unsafe fn get_aux<T>(&self, arg: c_int) -> Option<&T>
[src]
Gets the auxilliary data that was associated with a given parameter
via set_aux
. Returns None
if no data has been associated.
Unsafety
This function is unsafe as there is no guarantee that the type T
requested matches the type T
that was provided to set_aux
. The
types must be identical.