mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-23 19:24:19 +01:00
sqlite3: Implement some auxiliary functions
This adds `sqlite3_libversion()`, `sqlite3_libversion_number()`, and `libsql3_threadsafe()`.
This commit is contained in:
@@ -773,15 +773,17 @@ pub unsafe extern "C" fn sqlite3_complete(_sql: *const std::ffi::c_char) -> ffi:
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sqlite3_threadsafe() -> ffi::c_int {
|
||||
todo!();
|
||||
1
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sqlite3_libversion() -> *const std::ffi::c_char {
|
||||
todo!();
|
||||
ffi::CStr::from_bytes_with_nul(b"3.42.0\0")
|
||||
.unwrap()
|
||||
.as_ptr()
|
||||
}
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn sqlite3_libversion_number() -> ffi::c_int {
|
||||
todo!();
|
||||
3042000
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user