@op-engineering/op-sqlite 15.1.15 → 15.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,12 +11,14 @@ if (USE_SQLCIPHER)
11
11
  include_directories(../cpp/sqlcipher)
12
12
  endif()
13
13
 
14
- if (USE_LIBSQL)
14
+ if (USE_LIBSQL)
15
15
  include_directories(src/main/jniLibs/include)
16
16
  endif()
17
17
 
18
+ separate_arguments(SQLITE_FLAGS_LIST UNIX_COMMAND "${SQLITE_FLAGS}")
19
+
18
20
  add_definitions(
19
- ${SQLITE_FLAGS}
21
+ ${SQLITE_FLAGS_LIST}
20
22
  )
21
23
 
22
24
  add_library(
@@ -42,11 +44,11 @@ if (USE_SQLCIPHER)
42
44
  -DSQLITE_EXTRA_INIT=sqlcipher_extra_init
43
45
  -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown
44
46
  )
45
-
47
+
46
48
  find_package(openssl REQUIRED CONFIG)
47
49
  elseif (USE_LIBSQL)
48
50
  target_sources(${PACKAGE_NAME} PRIVATE ../cpp/libsql/bridge.cpp)
49
-
51
+
50
52
  add_definitions(
51
53
  -DOP_SQLITE_USE_LIBSQL=1
52
54
  )
@@ -89,7 +91,7 @@ if (USE_SQLCIPHER)
89
91
  elseif (USE_LIBSQL)
90
92
  cmake_path(SET LIBSQL_PATH ${CMAKE_CURRENT_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libsql_experimental.so NORMALIZE)
91
93
  add_library(libsql_experimental SHARED IMPORTED)
92
- set_target_properties(libsql_experimental PROPERTIES
94
+ set_target_properties(libsql_experimental PROPERTIES
93
95
  IMPORTED_LOCATION ${LIBSQL_PATH}
94
96
  IMPORTED_NO_SONAME TRUE
95
97
  )
@@ -110,4 +112,4 @@ else ()
110
112
  ReactAndroid::jsi
111
113
  fbjni::fbjni
112
114
  )
113
- endif()
115
+ endif()
@@ -46,7 +46,7 @@ if (isUserApp) {
46
46
  // Start from the root + 1 level up (to avoid detecting the op-sqlite/package.json) and traverse upwards to find the first package.json
47
47
  File currentDir = new File("$rootDir/../")
48
48
  packageJsonFile = null
49
-
49
+
50
50
  // Try to find package.json by traversing upwards
51
51
  while (currentDir != null) {
52
52
  File potential = new File(currentDir, "package.json")
@@ -70,6 +70,7 @@ if(opsqliteConfig) {
70
70
  useSQLCipher = opsqliteConfig["sqlcipher"]
71
71
  useCRSQLite = opsqliteConfig["crsqlite"]
72
72
  useSqliteVec = opsqliteConfig["sqliteVec"]
73
+
73
74
  performanceMode = opsqliteConfig["performanceMode"]
74
75
  sqliteFlags = opsqliteConfig["sqliteFlags"] ? opsqliteConfig["sqliteFlags"] : ""
75
76
  enableFTS5 = opsqliteConfig["fts5"]
@@ -82,7 +83,7 @@ if(useSQLCipher) {
82
83
  println "[OP-SQLITE] using sqlcipher."
83
84
  } else if(useLibsql) {
84
85
  println "[OP-SQLITE] using libsql. Report any issues to Turso"
85
- }
86
+ }
86
87
 
87
88
  if(useCRSQLite) {
88
89
  println "[OP-SQLITE] using CR-SQLite"
@@ -108,7 +109,7 @@ if(!tokenizers.isEmpty()) {
108
109
  if(useLibsql) {
109
110
  throw new GradleException("[OP-SQLITE] Error: libsql does not support tokenizers. Please disable tokenizers or do not enable libsql.")
110
111
  }
111
-
112
+
112
113
  println "[OP-SQLITE] Tokenizers enabled. Detected tokenizers: " + tokenizers
113
114
  }
114
115
 
@@ -168,6 +169,7 @@ android {
168
169
  }
169
170
 
170
171
  cppFlags "-O3 -frtti -fexceptions -Wall -fstack-protector-all"
172
+
171
173
  arguments "-DANDROID_STL=c++_shared",
172
174
  "-DSQLITE_FLAGS='$sqliteFlags'",
173
175
  "-DUSE_SQLCIPHER=${useSQLCipher ? 1 : 0}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@op-engineering/op-sqlite",
3
- "version": "15.1.15",
3
+ "version": "15.1.16",
4
4
  "description": "Fastest SQLite for React Native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",