pub fn register_entrypoint<F>(
    db: *mut sqlite3,
    _pz_err_msg: *mut *mut c_char,
    p_api: *mut sqlite3_api_routines,
    callback: F
) -> c_uintwhere
    F: Fn(*mut sqlite3) -> Result<()>,
Expand description

Low-level wrapper around a typical entrypoint to a SQLite extension. You shouldn’t have to use this directly - the sqlite_entrypoint macro will do this for you.

Examples found in repository?
examples/characters.rs (lines 154-157)
154
155
156
157
pub fn sqlite3_characters_init(db: *mut sqlite3) -> Result<()> {
    define_table_function::<CharactersTable>(db, "characters", None)?;
    Ok(())
}
More examples
Hide additional examples
examples/series.rs (lines 168-171)
168
169
170
171
pub fn sqlite3_seriesrs_init(db: *mut sqlite3) -> Result<()> {
    define_table_function::<GenerateSeriesTable>(db, "generate_series_rs", None)?;
    Ok(())
}
examples/hello.rs (lines 24-28)
24
25
26
27
28
pub fn sqlite3_hello_init(db: *mut sqlite3) -> Result<()> {
    let flags = FunctionFlags::UTF8 | FunctionFlags::DETERMINISTIC;
    define_scalar_function(db, "hello", 1, hello, flags)?;
    Ok(())
}
examples/scalar.rs (lines 42-49)
42
43
44
45
46
47
48
49
pub fn sqlite3_scalarrs_init(db: *mut sqlite3) -> Result<()> {
    let flags = FunctionFlags::UTF8 | FunctionFlags::DETERMINISTIC;
    define_scalar_function(db, "surround_rs", 1, surround, flags)?;
    define_scalar_function(db, "connect", -1, connect, flags)?;
    define_scalar_function(db, "yo_rs", 0, yo, flags)?;
    define_scalar_function(db, "add_rs", 2, add, flags)?;
    Ok(())
}