sqlite3: Add stubs to make Python build link

Add enough stubs to be able to link CPython build against Limbo's SQLite
compatibility API:

```
export LIBSQLITE3_LIBS=../limbo/target/debug/liblimbo_sqlite3.a
./configure
make -j8

[snip]

gcc -shared      Modules/_sqlite/blob.o Modules/_sqlite/connection.o Modules/_sqlite/cursor.o Modules/_sqlite/microprotocols.o Modules/_sqlite/module.o Modules/_sqlite/prepare_protocol.o Modules/_sqlite/row.o Modules/_sqlite/statement.o Modules/_sqlite/util.o ../limbo/target/debug/liblimbo_sqlite3.a  -o Modules/_sqlite3.cpython-314-x86_64-linux-gnu.so
thread '<unnamed>' panicked at sqlite3/src/lib.rs:751:5:
not yet implemented
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
make: *** [Makefile:1511: checksharedmods] Aborted (core dumped)
```

All that's left is to actually implement all of this...
This commit is contained in:
Pekka Enberg 2024-07-12 10:08:37 +03:00
parent f6704ba3e0
commit b14150f3b5
2 changed files with 819 additions and 0 deletions

View file

@ -25,18 +25,211 @@ typedef struct sqlite3_stmt sqlite3_stmt;
extern "C" {
#endif // __cplusplus
int sqlite3_initialize(void);
int sqlite3_shutdown(void);
int sqlite3_open(const char *filename, sqlite3 **db_out);
int sqlite3_open_v2(const char *filename, sqlite3 **db_out, int _flags, const char *_z_vfs);
int sqlite3_close(sqlite3 *db);
int sqlite3_close_v2(sqlite3 *db);
int sqlite3_trace_v2(sqlite3 *_db,
unsigned int _mask,
void (*_callback)(unsigned int, void*, void*, void*),
void *_context);
int sqlite3_progress_handler(sqlite3 *_db, int _n, int (*_callback)(void), void *_context);
int sqlite3_busy_timeout(sqlite3 *_db, int _ms);
int sqlite3_set_authorizer(sqlite3 *_db, int (*_callback)(void), void *_context);
void *sqlite3_context_db_handle(void *_context);
int sqlite3_prepare_v2(sqlite3 *db, const char *sql, int _len, sqlite3_stmt **out_stmt, const char **_tail);
int sqlite3_finalize(sqlite3_stmt *stmt);
int sqlite3_step(sqlite3_stmt *stmt);
int sqlite3_exec(sqlite3 *db, const char *sql, int (*_callback)(void), void *_context, char **_err);
int sqlite3_reset(sqlite3_stmt *stmt);
int sqlite3_changes(sqlite3 *db);
int sqlite3_stmt_readonly(sqlite3_stmt *stmt);
int sqlite3_stmt_busy(sqlite3_stmt *stmt);
int sqlite3_serialize(sqlite3 *_db, const char *_schema, void **_out, int *_out_bytes, unsigned int _flags);
int sqlite3_deserialize(sqlite3 *_db, const char *_schema, const void *_in_, int _in_bytes, unsigned int _flags);
int sqlite3_get_autocommit(sqlite3 *db);
int sqlite3_total_changes(sqlite3 *db);
int64_t sqlite3_last_insert_rowid(sqlite3 *db);
void sqlite3_interrupt(sqlite3 *db);
int sqlite3_db_config(sqlite3 *_db, int _op);
sqlite3 *sqlite3_db_handle(sqlite3_stmt *stmt);
void sqlite3_sleep(int _ms);
int sqlite3_limit(sqlite3 *_db, int _id, int _new_value);
void *sqlite3_malloc64(int _n);
void sqlite3_free(void *_ptr);
int sqlite3_errcode(sqlite3 *db);
const char *sqlite3_errstr(int _err);
void *sqlite3_user_data(void *_context);
void *sqlite3_backup_init(sqlite3 *_dest_db, const char *_dest_name, sqlite3 *_source_db, const char *_source_name);
int sqlite3_backup_step(void *_backup, int _n_pages);
int sqlite3_backup_remaining(void *_backup);
int sqlite3_backup_pagecount(void *_backup);
int sqlite3_backup_finish(void *_backup);
char *sqlite3_expanded_sql(sqlite3_stmt *_stmt);
int sqlite3_data_count(sqlite3_stmt *stmt);
int sqlite3_bind_parameter_count(sqlite3_stmt *stmt);
const char *sqlite3_bind_parameter_name(sqlite3_stmt *_stmt, int _idx);
int sqlite3_bind_null(sqlite3_stmt *stmt, int idx);
int sqlite3_bind_int64(sqlite3_stmt *stmt, int idx, int64_t val);
int sqlite3_bind_double(sqlite3_stmt *stmt, int idx, double val);
int sqlite3_bind_text(sqlite3_stmt *stmt, int idx, const char *text, int len, void *_destroy);
int sqlite3_bind_blob(sqlite3_stmt *stmt, int idx, const void *blob, int len, void *_destroy);
int sqlite3_column_type(sqlite3_stmt *stmt, int idx);
int sqlite3_column_count(sqlite3_stmt *stmt);
const char *sqlite3_column_decltype(sqlite3_stmt *stmt, int idx);
const char *sqlite3_column_name(sqlite3_stmt *stmt, int idx);
int64_t sqlite3_column_int64(sqlite3_stmt *stmt, int idx);
double sqlite3_column_double(sqlite3_stmt *stmt, int idx);
const void *sqlite3_column_blob(sqlite3_stmt *stmt, int idx);
int sqlite3_column_bytes(sqlite3_stmt *stmt, int idx);
int sqlite3_value_type(void *value);
int64_t sqlite3_value_int64(void *value);
double sqlite3_value_double(void *value);
const unsigned char *sqlite3_value_text(void *value);
const void *sqlite3_value_blob(void *value);
int sqlite3_value_bytes(void *value);
const unsigned char *sqlite3_column_text(sqlite3_stmt *stmt, int idx);
void sqlite3_result_null(void *_context);
void sqlite3_result_int64(void *_context, int64_t _val);
void sqlite3_result_double(void *_context, double _val);
void sqlite3_result_text(void *_context, const char *_text, int _len, void *_destroy);
void sqlite3_result_blob(void *_context, const void *_blob, int _len, void *_destroy);
void sqlite3_result_error_nomem(void *_context);
void sqlite3_result_error_toobig(void *_context);
void sqlite3_result_error(void *_context, const char *_err, int _len);
void *sqlite3_aggregate_context(void *_context, int _n);
int sqlite3_blob_open(sqlite3 *_db,
const char *_db_name,
const char *_table_name,
const char *_column_name,
int64_t _rowid,
int _flags,
void **_blob_out);
int sqlite3_blob_read(void *_blob, void *_data, int _n, int _offset);
int sqlite3_blob_write(void *_blob, const void *_data, int _n, int _offset);
int sqlite3_blob_bytes(void *_blob);
int sqlite3_blob_close(void *_blob);
int sqlite3_stricmp(const char *_a, const char *_b);
int sqlite3_create_collation_v2(sqlite3 *_db,
const char *_name,
int _enc,
void *_context,
int (*_cmp)(void),
void (*_destroy)(void));
int sqlite3_create_function_v2(sqlite3 *_db,
const char *_name,
int _n_args,
int _enc,
void *_context,
void (*_func)(void),
void (*_step)(void),
void (*_final_)(void),
void (*_destroy)(void));
int sqlite3_create_window_function(sqlite3 *_db,
const char *_name,
int _n_args,
int _enc,
void *_context,
void (*_x_step)(void),
void (*_x_final)(void),
void (*_x_value)(void),
void (*_x_inverse)(void),
void (*_destroy)(void));
const char *sqlite3_errmsg(sqlite3 *db);
int sqlite3_extended_errcode(sqlite3 *_db);
int sqlite3_complete(const char *_sql);
int sqlite3_threadsafe(void);
const char *sqlite3_libversion(void);
int sqlite3_libversion_number(void);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus

View file

@ -36,6 +36,16 @@ impl<'a> sqlite3_stmt<'a> {
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_initialize() -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_shutdown() -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_open(
filename: *const ffi::c_char,
@ -66,6 +76,16 @@ pub unsafe extern "C" fn sqlite3_open(
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_open_v2(
filename: *const ffi::c_char,
db_out: *mut *mut sqlite3,
_flags: ffi::c_int,
_z_vfs: *const ffi::c_char,
) -> ffi::c_int {
sqlite3_open(filename, db_out)
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_close(db: *mut sqlite3) -> ffi::c_int {
if db.is_null() {
@ -75,6 +95,59 @@ pub unsafe extern "C" fn sqlite3_close(db: *mut sqlite3) -> ffi::c_int {
SQLITE_OK
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_close_v2(db: *mut sqlite3) -> ffi::c_int {
sqlite3_close(db)
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_trace_v2(
_db: *mut sqlite3,
_mask: ffi::c_uint,
_callback: Option<
unsafe extern "C" fn(
ffi::c_uint,
*mut std::ffi::c_void,
*mut std::ffi::c_void,
*mut std::ffi::c_void,
),
>,
_context: *mut std::ffi::c_void,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_progress_handler(
_db: *mut sqlite3,
_n: ffi::c_int,
_callback: Option<unsafe extern "C" fn() -> ffi::c_int>,
_context: *mut std::ffi::c_void,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_busy_timeout(_db: *mut sqlite3, _ms: ffi::c_int) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_set_authorizer(
_db: *mut sqlite3,
_callback: Option<unsafe extern "C" fn() -> ffi::c_int>,
_context: *mut std::ffi::c_void,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_context_db_handle(
_context: *mut std::ffi::c_void,
) -> *mut std::ffi::c_void {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_prepare_v2(
db: *mut sqlite3,
@ -126,6 +199,373 @@ pub unsafe extern "C" fn sqlite3_step(stmt: *mut sqlite3_stmt) -> std::ffi::c_in
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_exec(
db: *mut sqlite3,
sql: *const ffi::c_char,
_callback: Option<unsafe extern "C" fn() -> ffi::c_int>,
_context: *mut std::ffi::c_void,
_err: *mut *mut std::ffi::c_char,
) -> ffi::c_int {
if db.is_null() || sql.is_null() {
return SQLITE_MISUSE;
}
let db: &mut sqlite3 = &mut *db;
let sql = ffi::CStr::from_ptr(sql);
let sql = match sql.to_str() {
Ok(s) => s,
Err(_) => return SQLITE_MISUSE,
};
match db.conn.execute(sql) {
Ok(_) => SQLITE_OK,
Err(_) => SQLITE_ERROR,
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_reset(stmt: *mut sqlite3_stmt) -> ffi::c_int {
let stmt = &mut *stmt;
stmt.row.replace(None);
SQLITE_OK
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_changes(db: *mut sqlite3) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_stmt_readonly(stmt: *mut sqlite3_stmt) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_stmt_busy(stmt: *mut sqlite3_stmt) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_serialize(
_db: *mut sqlite3,
_schema: *const std::ffi::c_char,
_out: *mut *mut std::ffi::c_void,
_out_bytes: *mut ffi::c_int,
_flags: ffi::c_uint,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_deserialize(
_db: *mut sqlite3,
_schema: *const std::ffi::c_char,
_in_: *const std::ffi::c_void,
_in_bytes: ffi::c_int,
_flags: ffi::c_uint,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_get_autocommit(db: *mut sqlite3) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_total_changes(db: *mut sqlite3) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_last_insert_rowid(db: *mut sqlite3) -> i64 {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_interrupt(db: *mut sqlite3) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_db_config(_db: *mut sqlite3, _op: ffi::c_int) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_db_handle(stmt: *mut sqlite3_stmt) -> *mut sqlite3 {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_sleep(_ms: ffi::c_int) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_limit(
_db: *mut sqlite3,
_id: ffi::c_int,
_new_value: ffi::c_int,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_malloc64(_n: ffi::c_int) -> *mut std::ffi::c_void {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_free(_ptr: *mut std::ffi::c_void) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_errcode(db: *mut sqlite3) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_errstr(_err: ffi::c_int) -> *const std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_user_data(
_context: *mut std::ffi::c_void,
) -> *mut std::ffi::c_void {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_backup_init(
_dest_db: *mut sqlite3,
_dest_name: *const std::ffi::c_char,
_source_db: *mut sqlite3,
_source_name: *const std::ffi::c_char,
) -> *mut std::ffi::c_void {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_backup_step(
_backup: *mut std::ffi::c_void,
_n_pages: ffi::c_int,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_backup_remaining(_backup: *mut std::ffi::c_void) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_backup_pagecount(_backup: *mut std::ffi::c_void) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_backup_finish(_backup: *mut std::ffi::c_void) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_expanded_sql(_stmt: *mut sqlite3_stmt) -> *mut std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_data_count(stmt: *mut sqlite3_stmt) -> ffi::c_int {
let stmt = &*stmt;
let row = stmt.row.borrow();
let row = match row.as_ref() {
Some(row) => row,
None => return 0,
};
row.values.len() as ffi::c_int
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_parameter_count(stmt: *mut sqlite3_stmt) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_parameter_name(
_stmt: *mut sqlite3_stmt,
_idx: ffi::c_int,
) -> *const std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_null(stmt: *mut sqlite3_stmt, idx: ffi::c_int) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_int64(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
val: i64,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_double(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
val: f64,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_text(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
text: *const std::ffi::c_char,
len: ffi::c_int,
_destroy: *mut std::ffi::c_void,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_bind_blob(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
blob: *const std::ffi::c_void,
len: ffi::c_int,
_destroy: *mut std::ffi::c_void,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_type(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_count(stmt: *mut sqlite3_stmt) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_decltype(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
) -> *const std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_name(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
) -> *const std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_int64(stmt: *mut sqlite3_stmt, idx: ffi::c_int) -> i64 {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_double(stmt: *mut sqlite3_stmt, idx: ffi::c_int) -> f64 {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_blob(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
) -> *const std::ffi::c_void {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_bytes(
stmt: *mut sqlite3_stmt,
idx: ffi::c_int,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_value_type(value: *mut std::ffi::c_void) -> ffi::c_int {
let value = value as *mut limbo_core::Value;
let value = &*value;
match value {
limbo_core::Value::Null => 0,
limbo_core::Value::Integer(_) => 1,
limbo_core::Value::Float(_) => 2,
limbo_core::Value::Text(_) => 3,
limbo_core::Value::Blob(_) => 4,
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_value_int64(value: *mut std::ffi::c_void) -> i64 {
let value = value as *mut limbo_core::Value;
let value = &*value;
match value {
limbo_core::Value::Integer(i) => *i,
_ => 0,
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_value_double(value: *mut std::ffi::c_void) -> f64 {
let value = value as *mut limbo_core::Value;
let value = &*value;
match value {
limbo_core::Value::Float(f) => *f,
_ => 0.0,
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_value_text(
value: *mut std::ffi::c_void,
) -> *const std::ffi::c_uchar {
let value = value as *mut limbo_core::Value;
let value = &*value;
match value {
limbo_core::Value::Text(text) => text.as_bytes().as_ptr(),
_ => std::ptr::null(),
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_value_blob(
value: *mut std::ffi::c_void,
) -> *const std::ffi::c_void {
let value = value as *mut limbo_core::Value;
let value = &*value;
match value {
limbo_core::Value::Blob(blob) => blob.as_ptr() as *const std::ffi::c_void,
_ => std::ptr::null(),
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_value_bytes(value: *mut std::ffi::c_void) -> ffi::c_int {
let value = value as *mut limbo_core::Value;
let value = &*value;
match value {
limbo_core::Value::Blob(blob) => blob.len() as ffi::c_int,
_ => 0,
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_column_text(
stmt: *mut sqlite3_stmt,
@ -142,3 +582,189 @@ pub unsafe extern "C" fn sqlite3_column_text(
_ => std::ptr::null(),
}
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_null(_context: *mut std::ffi::c_void) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_int64(_context: *mut std::ffi::c_void, _val: i64) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_double(_context: *mut std::ffi::c_void, _val: f64) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_text(
_context: *mut std::ffi::c_void,
_text: *const std::ffi::c_char,
_len: ffi::c_int,
_destroy: *mut std::ffi::c_void,
) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_blob(
_context: *mut std::ffi::c_void,
_blob: *const std::ffi::c_void,
_len: ffi::c_int,
_destroy: *mut std::ffi::c_void,
) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_error_nomem(_context: *mut std::ffi::c_void) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_error_toobig(_context: *mut std::ffi::c_void) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_result_error(
_context: *mut std::ffi::c_void,
_err: *const std::ffi::c_char,
_len: ffi::c_int,
) {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_aggregate_context(
_context: *mut std::ffi::c_void,
_n: ffi::c_int,
) -> *mut std::ffi::c_void {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_blob_open(
_db: *mut sqlite3,
_db_name: *const std::ffi::c_char,
_table_name: *const std::ffi::c_char,
_column_name: *const std::ffi::c_char,
_rowid: i64,
_flags: ffi::c_int,
_blob_out: *mut *mut std::ffi::c_void,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_blob_read(
_blob: *mut std::ffi::c_void,
_data: *mut std::ffi::c_void,
_n: ffi::c_int,
_offset: ffi::c_int,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_blob_write(
_blob: *mut std::ffi::c_void,
_data: *const std::ffi::c_void,
_n: ffi::c_int,
_offset: ffi::c_int,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_blob_bytes(_blob: *mut std::ffi::c_void) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_blob_close(_blob: *mut std::ffi::c_void) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_stricmp(
_a: *const std::ffi::c_char,
_b: *const std::ffi::c_char,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_create_collation_v2(
_db: *mut sqlite3,
_name: *const std::ffi::c_char,
_enc: ffi::c_int,
_context: *mut std::ffi::c_void,
_cmp: Option<unsafe extern "C" fn() -> ffi::c_int>,
_destroy: Option<unsafe extern "C" fn()>,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_create_function_v2(
_db: *mut sqlite3,
_name: *const std::ffi::c_char,
_n_args: ffi::c_int,
_enc: ffi::c_int,
_context: *mut std::ffi::c_void,
_func: Option<unsafe extern "C" fn()>,
_step: Option<unsafe extern "C" fn()>,
_final_: Option<unsafe extern "C" fn()>,
_destroy: Option<unsafe extern "C" fn()>,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_create_window_function(
_db: *mut sqlite3,
_name: *const std::ffi::c_char,
_n_args: ffi::c_int,
_enc: ffi::c_int,
_context: *mut std::ffi::c_void,
_x_step: Option<unsafe extern "C" fn()>,
_x_final: Option<unsafe extern "C" fn()>,
_x_value: Option<unsafe extern "C" fn()>,
_x_inverse: Option<unsafe extern "C" fn()>,
_destroy: Option<unsafe extern "C" fn()>,
) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_errmsg(db: *mut sqlite3) -> *const std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_extended_errcode(_db: *mut sqlite3) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_complete(_sql: *const std::ffi::c_char) -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_threadsafe() -> ffi::c_int {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_libversion() -> *const std::ffi::c_char {
todo!();
}
#[no_mangle]
pub unsafe extern "C" fn sqlite3_libversion_number() -> ffi::c_int {
todo!();
}