str_for_sqlite

Function str_for_sqlite 

Source
pub(crate) fn str_for_sqlite(
    s: &[u8],
) -> Result<(*const c_char, c_int, sqlite3_destructor_type)>
Expand description

Returns Ok((string ptr, len as c_int, SQLITE_STATIC | SQLITE_TRANSIENT)) normally. Returns error if the string is too large for sqlite. The sqlite3_destructor_type item is always SQLITE_TRANSIENT unless the string was empty (in which case it’s SQLITE_STATIC, and the ptr is static).