Skip to content

Commit f1a8688

Browse files
authored
Merge branch 'main' into main
2 parents 8d78905 + 65d4b19 commit f1a8688

File tree

24 files changed

+1615
-42
lines changed

24 files changed

+1615
-42
lines changed

libsql-ffi/bundled/SQLite3MultipleCiphers/src/sqlite3.c

Lines changed: 357 additions & 3 deletions
Large diffs are not rendered by default.

libsql-ffi/bundled/bindings/bindgen.rs

Lines changed: 50 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ extern "C" {
940940
extern "C" {
941941
pub fn sqlite3_vmprintf(
942942
arg1: *const ::std::os::raw::c_char,
943-
arg2: *mut __va_list_tag,
943+
arg2: va_list,
944944
) -> *mut ::std::os::raw::c_char;
945945
}
946946
extern "C" {
@@ -956,7 +956,7 @@ extern "C" {
956956
arg1: ::std::os::raw::c_int,
957957
arg2: *mut ::std::os::raw::c_char,
958958
arg3: *const ::std::os::raw::c_char,
959-
arg4: *mut __va_list_tag,
959+
arg4: va_list,
960960
) -> *mut ::std::os::raw::c_char;
961961
}
962962
extern "C" {
@@ -2503,7 +2503,7 @@ extern "C" {
25032503
pub fn sqlite3_str_vappendf(
25042504
arg1: *mut sqlite3_str,
25052505
zFormat: *const ::std::os::raw::c_char,
2506-
arg2: *mut __va_list_tag,
2506+
arg2: va_list,
25072507
);
25082508
}
25092509
extern "C" {
@@ -2863,6 +2863,37 @@ extern "C" {
28632863
arg: *mut ::std::os::raw::c_void,
28642864
) -> *mut ::std::os::raw::c_void;
28652865
}
2866+
extern "C" {
2867+
pub fn libsql_wal_disable_checkpoint(db: *mut sqlite3) -> ::std::os::raw::c_int;
2868+
}
2869+
extern "C" {
2870+
pub fn libsql_wal_frame_count(
2871+
arg1: *mut sqlite3,
2872+
arg2: *mut ::std::os::raw::c_uint,
2873+
) -> ::std::os::raw::c_int;
2874+
}
2875+
extern "C" {
2876+
pub fn libsql_wal_get_frame(
2877+
arg1: *mut sqlite3,
2878+
arg2: ::std::os::raw::c_uint,
2879+
arg3: *mut ::std::os::raw::c_void,
2880+
arg4: ::std::os::raw::c_uint,
2881+
) -> ::std::os::raw::c_int;
2882+
}
2883+
extern "C" {
2884+
pub fn libsql_wal_insert_begin(arg1: *mut sqlite3) -> ::std::os::raw::c_int;
2885+
}
2886+
extern "C" {
2887+
pub fn libsql_wal_insert_end(arg1: *mut sqlite3) -> ::std::os::raw::c_int;
2888+
}
2889+
extern "C" {
2890+
pub fn libsql_wal_insert_frame(
2891+
arg1: *mut sqlite3,
2892+
arg2: ::std::os::raw::c_uint,
2893+
arg3: *mut ::std::os::raw::c_void,
2894+
arg4: ::std::os::raw::c_uint,
2895+
) -> ::std::os::raw::c_int;
2896+
}
28662897
extern "C" {
28672898
pub fn sqlite3_system_errno(arg1: *mut sqlite3) -> ::std::os::raw::c_int;
28682899
}
@@ -3289,6 +3320,14 @@ pub struct libsql_wal_methods {
32893320
arg3: *mut ::std::os::raw::c_uchar,
32903321
) -> ::std::os::raw::c_int,
32913322
>,
3323+
pub xReadFrameRaw: ::std::option::Option<
3324+
unsafe extern "C" fn(
3325+
pWal: *mut wal_impl,
3326+
arg1: ::std::os::raw::c_uint,
3327+
arg2: ::std::os::raw::c_int,
3328+
arg3: *mut ::std::os::raw::c_uchar,
3329+
) -> ::std::os::raw::c_int,
3330+
>,
32923331
pub xDbsize:
32933332
::std::option::Option<unsafe extern "C" fn(pWal: *mut wal_impl) -> ::std::os::raw::c_uint>,
32943333
pub xBeginWriteTransaction:
@@ -3316,6 +3355,13 @@ pub struct libsql_wal_methods {
33163355
aWalData: *mut ::std::os::raw::c_uint,
33173356
) -> ::std::os::raw::c_int,
33183357
>,
3358+
pub xFrameCount: ::std::option::Option<
3359+
unsafe extern "C" fn(
3360+
pWal: *mut wal_impl,
3361+
arg1: ::std::os::raw::c_int,
3362+
arg2: *mut ::std::os::raw::c_uint,
3363+
) -> ::std::os::raw::c_int,
3364+
>,
33193365
pub xFrames: ::std::option::Option<
33203366
unsafe extern "C" fn(
33213367
pWal: *mut wal_impl,
@@ -3524,12 +3570,4 @@ extern "C" {
35243570
extern "C" {
35253571
pub static sqlite3_wal_manager: libsql_wal_manager;
35263572
}
3527-
pub type __builtin_va_list = [__va_list_tag; 1usize];
3528-
#[repr(C)]
3529-
#[derive(Debug, Copy, Clone)]
3530-
pub struct __va_list_tag {
3531-
pub gp_offset: ::std::os::raw::c_uint,
3532-
pub fp_offset: ::std::os::raw::c_uint,
3533-
pub overflow_arg_area: *mut ::std::os::raw::c_void,
3534-
pub reg_save_area: *mut ::std::os::raw::c_void,
3535-
}
3573+
pub type __builtin_va_list = *mut ::std::os::raw::c_char;

libsql-ffi/bundled/bindings/session_bindgen.rs

Lines changed: 72 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ extern "C" {
2323
) -> ::std::os::raw::c_int;
2424
}
2525

26-
pub const SQLITE_VERSION: &[u8; 7] = b"3.44.0\0";
27-
pub const SQLITE_VERSION_NUMBER: i32 = 3044000;
26+
pub const __GNUC_VA_LIST: i32 = 1;
27+
pub const SQLITE_VERSION: &[u8; 7] = b"3.45.1\0";
28+
pub const SQLITE_VERSION_NUMBER: i32 = 3045001;
2829
pub const SQLITE_SOURCE_ID: &[u8; 85] =
29-
b"2023-11-01 11:23:50 17129ba1ff7f0daf37100ee82d507aef7827cf38de1866e2633096ae6ad8alt1\0";
30+
b"2024-01-30 16:01:20 e876e51a0ed5c5b3126f52e532044363a014bc594cfefa87ffb5b82257ccalt1\0";
3031
pub const LIBSQL_VERSION: &[u8; 6] = b"0.2.3\0";
3132
pub const SQLITE_OK: i32 = 0;
3233
pub const SQLITE_ERROR: i32 = 1;
@@ -355,6 +356,7 @@ pub const SQLITE_DETERMINISTIC: i32 = 2048;
355356
pub const SQLITE_DIRECTONLY: i32 = 524288;
356357
pub const SQLITE_SUBTYPE: i32 = 1048576;
357358
pub const SQLITE_INNOCUOUS: i32 = 2097152;
359+
pub const SQLITE_RESULT_SUBTYPE: i32 = 16777216;
358360
pub const SQLITE_WIN32_DATA_DIRECTORY_TYPE: i32 = 1;
359361
pub const SQLITE_WIN32_TEMP_DIRECTORY_TYPE: i32 = 2;
360362
pub const SQLITE_TXN_NONE: i32 = 0;
@@ -407,6 +409,7 @@ pub const SQLITE_TESTCTRL_PENDING_BYTE: i32 = 11;
407409
pub const SQLITE_TESTCTRL_ASSERT: i32 = 12;
408410
pub const SQLITE_TESTCTRL_ALWAYS: i32 = 13;
409411
pub const SQLITE_TESTCTRL_RESERVE: i32 = 14;
412+
pub const SQLITE_TESTCTRL_JSON_SELFCHECK: i32 = 14;
410413
pub const SQLITE_TESTCTRL_OPTIMIZATIONS: i32 = 15;
411414
pub const SQLITE_TESTCTRL_ISKEYWORD: i32 = 16;
412415
pub const SQLITE_TESTCTRL_SCRATCHMALLOC: i32 = 17;
@@ -516,8 +519,8 @@ pub const FTS5_TOKENIZE_DOCUMENT: i32 = 4;
516519
pub const FTS5_TOKENIZE_AUX: i32 = 8;
517520
pub const FTS5_TOKEN_COLOCATED: i32 = 1;
518521
pub const WAL_SAVEPOINT_NDATA: i32 = 4;
519-
pub type __gnuc_va_list = __builtin_va_list;
520522
pub type va_list = __builtin_va_list;
523+
pub type __gnuc_va_list = __builtin_va_list;
521524
extern "C" {
522525
pub static sqlite3_version: [::std::os::raw::c_char; 0usize];
523526
}
@@ -2278,11 +2281,7 @@ pub struct sqlite3_module {
22782281
pzErr: *mut *mut ::std::os::raw::c_char,
22792282
) -> ::std::os::raw::c_int,
22802283
>,
2281-
}
2282-
#[repr(C)]
2283-
#[derive(Debug, Copy, Clone)]
2284-
pub struct libsql_module {
2285-
pub iVersion: ::std::os::raw::c_int,
2284+
pub reserved: [::std::option::Option<unsafe extern "C" fn()>; 5usize],
22862285
pub xPreparedSql: ::std::option::Option<
22872286
unsafe extern "C" fn(
22882287
arg1: *mut sqlite3_vtab_cursor,
@@ -2344,16 +2343,6 @@ extern "C" {
23442343
xDestroy: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
23452344
) -> ::std::os::raw::c_int;
23462345
}
2347-
extern "C" {
2348-
pub fn libsql_create_module(
2349-
db: *mut sqlite3,
2350-
zName: *const ::std::os::raw::c_char,
2351-
p: *const sqlite3_module,
2352-
pLibsql: *const libsql_module,
2353-
pClientData: *mut ::std::os::raw::c_void,
2354-
xDestroy: ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>,
2355-
) -> ::std::os::raw::c_int;
2356-
}
23572346
extern "C" {
23582347
pub fn sqlite3_drop_modules(
23592348
db: *mut sqlite3,
@@ -2364,7 +2353,6 @@ extern "C" {
23642353
#[derive(Debug, Copy, Clone)]
23652354
pub struct sqlite3_vtab {
23662355
pub pModule: *const sqlite3_module,
2367-
pub pLibsqlModule: *const libsql_module,
23682356
pub nRef: ::std::os::raw::c_int,
23692357
pub zErrMsg: *mut ::std::os::raw::c_char,
23702358
}
@@ -2892,6 +2880,37 @@ extern "C" {
28922880
arg: *mut ::std::os::raw::c_void,
28932881
) -> *mut ::std::os::raw::c_void;
28942882
}
2883+
extern "C" {
2884+
pub fn libsql_wal_disable_checkpoint(db: *mut sqlite3) -> ::std::os::raw::c_int;
2885+
}
2886+
extern "C" {
2887+
pub fn libsql_wal_frame_count(
2888+
arg1: *mut sqlite3,
2889+
arg2: *mut ::std::os::raw::c_uint,
2890+
) -> ::std::os::raw::c_int;
2891+
}
2892+
extern "C" {
2893+
pub fn libsql_wal_get_frame(
2894+
arg1: *mut sqlite3,
2895+
arg2: ::std::os::raw::c_uint,
2896+
arg3: *mut ::std::os::raw::c_void,
2897+
arg4: ::std::os::raw::c_uint,
2898+
) -> ::std::os::raw::c_int;
2899+
}
2900+
extern "C" {
2901+
pub fn libsql_wal_insert_begin(arg1: *mut sqlite3) -> ::std::os::raw::c_int;
2902+
}
2903+
extern "C" {
2904+
pub fn libsql_wal_insert_end(arg1: *mut sqlite3) -> ::std::os::raw::c_int;
2905+
}
2906+
extern "C" {
2907+
pub fn libsql_wal_insert_frame(
2908+
arg1: *mut sqlite3,
2909+
arg2: ::std::os::raw::c_uint,
2910+
arg3: *mut ::std::os::raw::c_void,
2911+
arg4: ::std::os::raw::c_uint,
2912+
) -> ::std::os::raw::c_int;
2913+
}
28952914
extern "C" {
28962915
pub fn sqlite3_system_errno(arg1: *mut sqlite3) -> ::std::os::raw::c_int;
28972916
}
@@ -3659,6 +3678,24 @@ pub struct Fts5ExtensionApi {
36593678
piCol: *mut ::std::os::raw::c_int,
36603679
),
36613680
>,
3681+
pub xQueryToken: ::std::option::Option<
3682+
unsafe extern "C" fn(
3683+
arg1: *mut Fts5Context,
3684+
iPhrase: ::std::os::raw::c_int,
3685+
iToken: ::std::os::raw::c_int,
3686+
ppToken: *mut *const ::std::os::raw::c_char,
3687+
pnToken: *mut ::std::os::raw::c_int,
3688+
) -> ::std::os::raw::c_int,
3689+
>,
3690+
pub xInstToken: ::std::option::Option<
3691+
unsafe extern "C" fn(
3692+
arg1: *mut Fts5Context,
3693+
iIdx: ::std::os::raw::c_int,
3694+
iToken: ::std::os::raw::c_int,
3695+
arg2: *mut *const ::std::os::raw::c_char,
3696+
arg3: *mut ::std::os::raw::c_int,
3697+
) -> ::std::os::raw::c_int,
3698+
>,
36623699
}
36633700
#[repr(C)]
36643701
#[derive(Debug, Copy, Clone)]
@@ -3795,6 +3832,14 @@ pub struct libsql_wal_methods {
37953832
arg3: *mut ::std::os::raw::c_uchar,
37963833
) -> ::std::os::raw::c_int,
37973834
>,
3835+
pub xReadFrameRaw: ::std::option::Option<
3836+
unsafe extern "C" fn(
3837+
pWal: *mut wal_impl,
3838+
arg1: ::std::os::raw::c_uint,
3839+
arg2: ::std::os::raw::c_int,
3840+
arg3: *mut ::std::os::raw::c_uchar,
3841+
) -> ::std::os::raw::c_int,
3842+
>,
37983843
pub xDbsize:
37993844
::std::option::Option<unsafe extern "C" fn(pWal: *mut wal_impl) -> ::std::os::raw::c_uint>,
38003845
pub xBeginWriteTransaction:
@@ -3822,6 +3867,13 @@ pub struct libsql_wal_methods {
38223867
aWalData: *mut ::std::os::raw::c_uint,
38233868
) -> ::std::os::raw::c_int,
38243869
>,
3870+
pub xFrameCount: ::std::option::Option<
3871+
unsafe extern "C" fn(
3872+
pWal: *mut wal_impl,
3873+
arg1: ::std::os::raw::c_int,
3874+
arg2: *mut ::std::os::raw::c_uint,
3875+
) -> ::std::os::raw::c_int,
3876+
>,
38253877
pub xFrames: ::std::option::Option<
38263878
unsafe extern "C" fn(
38273879
pWal: *mut wal_impl,

0 commit comments

Comments
 (0)