Function sqlite_loadable::api::value_int

source ·
pub fn value_int(value: &*mut sqlite3_value) -> i32
Expand description

Returns the sqlite3_value_int result from the given sqlite3_value, as i32.

Examples found in repository?
examples/scalar.rs (line 22)
21
22
23
24
25
26
fn add(context: *mut sqlite3_context, values: &[*mut sqlite3_value]) -> Result<()> {
    let a = api::value_int(values.get(0).expect("1st argument"));
    let b = api::value_int(values.get(1).expect("2nd argument"));
    api::result_int(context, a + b);
    Ok(())
}