@op-engineering/op-sqlite 15.0.6 → 15.1.0
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.
- package/android/CMakeLists.txt +1 -1
- package/android/build.gradle +1 -1
- package/android/cpp-adapter.cpp +1 -1
- package/android/jniLibs/arm64-v8a/libsql_experimental.a +0 -0
- package/android/jniLibs/armeabi-v7a/libsql_experimental.a +0 -0
- package/android/jniLibs/x86/libsql_experimental.a +0 -0
- package/android/jniLibs/x86_64/libsql_experimental.a +0 -0
- package/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt +7 -9
- package/cpp/DBHostObject.cpp +470 -660
- package/cpp/DBHostObject.h +56 -58
- package/cpp/DumbHostObject.cpp +1 -1
- package/cpp/DumbHostObject.h +12 -13
- package/cpp/OPSqlite.cpp +207 -0
- package/cpp/OPThreadPool.cpp +79 -79
- package/cpp/OPThreadPool.h +28 -28
- package/cpp/PreparedStatementHostObject.cpp +87 -136
- package/cpp/PreparedStatementHostObject.h +16 -28
- package/cpp/SmartHostObject.cpp +1 -1
- package/cpp/SmartHostObject.h +6 -7
- package/cpp/bridge.cpp +639 -633
- package/cpp/bridge.h +2 -2
- package/cpp/libsql/LICENSE.txt +9 -0
- package/cpp/libsql/bridge.cpp +25 -2
- package/cpp/libsql/{bridge.h → bridge.hpp} +8 -4
- package/cpp/libsql/libsql.h +4 -0
- package/cpp/macros.hpp +21 -0
- package/cpp/sqlcipher/LICENSE.txt +24 -0
- package/cpp/types.hpp +42 -0
- package/cpp/utils.cpp +320 -255
- package/cpp/{utils.h → utils.hpp} +9 -1
- package/ios/OPSQLite.mm +104 -106
- package/ios/libsql.xcframework/Info.plist +5 -5
- package/ios/libsql.xcframework/ios-arm64/Headers/libsql.h +4 -0
- package/ios/libsql.xcframework/ios-arm64/libsql_experimental.a +0 -0
- package/ios/libsql.xcframework/ios-arm64_x86_64-simulator/Headers/libsql.h +4 -0
- package/ios/libsql.xcframework/ios-arm64_x86_64-simulator/libsql_experimental.a +0 -0
- package/lib/module/functions.js +42 -33
- package/lib/module/functions.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/functions.d.ts +5 -1
- package/lib/typescript/src/functions.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +9 -1
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/op-sqlite.podspec +1 -1
- package/package.json +10 -8
- package/src/functions.ts +54 -43
- package/src/index.ts +1 -12
- package/src/types.ts +9 -1
- package/cpp/bindings.cpp +0 -202
- package/cpp/macros.h +0 -15
- package/cpp/types.h +0 -33
- /package/cpp/{bindings.h → OPSqlite.hpp} +0 -0
package/android/CMakeLists.txt
CHANGED
package/android/build.gradle
CHANGED
package/android/cpp-adapter.cpp
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,14 +12,13 @@ import java.io.InputStream
|
|
|
12
12
|
import java.io.OutputStream
|
|
13
13
|
import com.facebook.react.util.RNLog;
|
|
14
14
|
|
|
15
|
-
//@ReactModule(name = OPSQLiteModule.NAME)
|
|
16
15
|
internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
|
|
17
16
|
override fun getName(): String {
|
|
18
17
|
return NAME
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
fun getTypedExportedConstants(): MutableMap<String, Any
|
|
22
|
-
val constants: MutableMap<String, Any
|
|
20
|
+
fun getTypedExportedConstants(): MutableMap<String, Any?> {
|
|
21
|
+
val constants: MutableMap<String, Any?> = HashMap()
|
|
23
22
|
val context = reactApplicationContext
|
|
24
23
|
val dbPath =
|
|
25
24
|
context.getDatabasePath("defaultDatabase")
|
|
@@ -28,14 +27,14 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
|
|
|
28
27
|
constants["ANDROID_DATABASE_PATH"] = dbPath
|
|
29
28
|
val filesPath = context.filesDir.absolutePath
|
|
30
29
|
constants["ANDROID_FILES_PATH"] = filesPath
|
|
31
|
-
val externalFilesDir = context.getExternalFilesDir(null)
|
|
32
|
-
constants["ANDROID_EXTERNAL_FILES_PATH"] = externalFilesDir
|
|
33
|
-
constants["IOS_DOCUMENT_PATH"] =
|
|
34
|
-
constants["IOS_LIBRARY_PATH"] =
|
|
30
|
+
val externalFilesDir = context.getExternalFilesDir(null)
|
|
31
|
+
constants["ANDROID_EXTERNAL_FILES_PATH"] = externalFilesDir?.absolutePath
|
|
32
|
+
constants["IOS_DOCUMENT_PATH"] = null
|
|
33
|
+
constants["IOS_LIBRARY_PATH"] = null
|
|
35
34
|
return constants
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
override fun getConstants(): MutableMap<String, Any
|
|
37
|
+
override fun getConstants(): MutableMap<String, Any?> {
|
|
39
38
|
return getTypedExportedConstants()
|
|
40
39
|
}
|
|
41
40
|
|
|
@@ -53,7 +52,6 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
|
|
|
53
52
|
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
54
53
|
fun getDylibPath(bundleId: String, name: String): Boolean {
|
|
55
54
|
throw Exception("Do not call getDylibPath on Android")
|
|
56
|
-
return true
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
@ReactMethod
|