Function 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)
21fn add(context: *mut sqlite3_context, values: &[*mut sqlite3_value]) -> Result<()> {
22    let a = api::value_int(values.get(0).expect("1st argument"));
23    let b = api::value_int(values.get(1).expect("2nd argument"));
24    api::result_int(context, a + b);
25    Ok(())
26}