aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bun.js/bindings/sqlite/lazy_sqlite3.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bun.js/bindings/sqlite/lazy_sqlite3.h b/src/bun.js/bindings/sqlite/lazy_sqlite3.h
index 086111109..d692a0312 100644
--- a/src/bun.js/bindings/sqlite/lazy_sqlite3.h
+++ b/src/bun.js/bindings/sqlite/lazy_sqlite3.h
@@ -70,6 +70,8 @@ typedef int (*lazy_sqlite3_deserialize_type)(
unsigned mFlags /* Zero or more SQLITE_DESERIALIZE_* flags */
);
+typedef int (*lazy_sqlite3_stmt_readonly_type)(sqlite3_stmt* pStmt);
+
static lazy_sqlite3_bind_blob_type lazy_sqlite3_bind_blob;
static lazy_sqlite3_bind_double_type lazy_sqlite3_bind_double;
static lazy_sqlite3_bind_int_type lazy_sqlite3_bind_int;
@@ -109,6 +111,7 @@ static lazy_sqlite3_load_extension_type lazy_sqlite3_load_extension;
static lazy_sqlite3_malloc64_type lazy_sqlite3_malloc64;
static lazy_sqlite3_serialize_type lazy_sqlite3_serialize;
static lazy_sqlite3_deserialize_type lazy_sqlite3_deserialize;
+static lazy_sqlite3_stmt_readonly_type lazy_sqlite3_stmt_readonly;
#define sqlite3_bind_blob lazy_sqlite3_bind_blob
#define sqlite3_bind_double lazy_sqlite3_bind_double
@@ -147,6 +150,7 @@ static lazy_sqlite3_deserialize_type lazy_sqlite3_deserialize;
#define sqlite3_malloc64 lazy_sqlite3_malloc64
#define sqlite3_serialize lazy_sqlite3_serialize
#define sqlite3_deserialize lazy_sqlite3_deserialize
+#define sqlite3_stmt_readonly lazy_sqlite3_stmt_readonly
static void* sqlite3_handle = nullptr;
static const char* sqlite3_lib_path = "libsqlite3.dylib";
@@ -197,6 +201,7 @@ static int lazyLoadSQLite()
lazy_sqlite3_serialize = (lazy_sqlite3_serialize_type)dlsym(sqlite3_handle, "sqlite3_serialize");
lazy_sqlite3_deserialize = (lazy_sqlite3_deserialize_type)dlsym(sqlite3_handle, "sqlite3_deserialize");
lazy_sqlite3_malloc64 = (lazy_sqlite3_malloc64_type)dlsym(sqlite3_handle, "sqlite3_malloc64");
+ lazy_sqlite3_stmt_readonly = (lazy_sqlite3_stmt_readonly_type)dlsym(sqlite3_handle, "sqlite3_stmt_readonly");
return 0;
}