expo-sqlite 13.1.1 → 13.1.2
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/CHANGELOG.md +6 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/sqlite/NativeDatabase.kt +5 -0
- package/android/src/main/java/expo/modules/sqlite/NativeDatabaseBinding.kt +6 -1
- package/android/src/main/java/expo/modules/sqlite/NativeStatement.kt +5 -0
- package/android/src/main/java/expo/modules/sqlite/NativeStatementBinding.kt +6 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 13.1.2 — 2023-12-21
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- Fixed `NativeStatementBinding` leakage on Android. ([#25996](https://github.com/expo/expo/pull/25996) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
13
19
|
## 13.1.1 — 2023-12-19
|
|
14
20
|
|
|
15
21
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -4,7 +4,7 @@ apply plugin: 'maven-publish'
|
|
|
4
4
|
apply plugin: 'de.undercouch.download'
|
|
5
5
|
|
|
6
6
|
group = 'host.exp.exponent'
|
|
7
|
-
version = '13.1.
|
|
7
|
+
version = '13.1.2'
|
|
8
8
|
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
10
10
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -106,7 +106,7 @@ android {
|
|
|
106
106
|
namespace "expo.modules.sqlite"
|
|
107
107
|
defaultConfig {
|
|
108
108
|
versionCode 18
|
|
109
|
-
versionName "13.1.
|
|
109
|
+
versionName "13.1.2"
|
|
110
110
|
|
|
111
111
|
externalNativeBuild {
|
|
112
112
|
cmake {
|
|
@@ -10,4 +10,9 @@ internal class NativeDatabase(val databaseName: String, val openOptions: OpenDat
|
|
|
10
10
|
override fun equals(other: Any?): Boolean {
|
|
11
11
|
return other is NativeDatabase && this.ref == other.ref
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
override fun deallocate() {
|
|
15
|
+
super.deallocate()
|
|
16
|
+
this.ref.close()
|
|
17
|
+
}
|
|
13
18
|
}
|
|
@@ -4,12 +4,13 @@ package expo.modules.sqlite
|
|
|
4
4
|
|
|
5
5
|
import com.facebook.jni.HybridData
|
|
6
6
|
import expo.modules.core.interfaces.DoNotStrip
|
|
7
|
+
import java.io.Closeable
|
|
7
8
|
|
|
8
9
|
private typealias UpdateListener = (databaseName: String, tableName: String, operationType: Int, rowID: Long) -> Unit
|
|
9
10
|
|
|
10
11
|
@Suppress("KotlinJniMissingFunction")
|
|
11
12
|
@DoNotStrip
|
|
12
|
-
internal class NativeDatabaseBinding {
|
|
13
|
+
internal class NativeDatabaseBinding : Closeable {
|
|
13
14
|
@DoNotStrip
|
|
14
15
|
private val mHybridData: HybridData
|
|
15
16
|
|
|
@@ -19,6 +20,10 @@ internal class NativeDatabaseBinding {
|
|
|
19
20
|
mHybridData = initHybrid()
|
|
20
21
|
}
|
|
21
22
|
|
|
23
|
+
override fun close() {
|
|
24
|
+
mHybridData.resetNative()
|
|
25
|
+
}
|
|
26
|
+
|
|
22
27
|
/**
|
|
23
28
|
* Enable data change notifications
|
|
24
29
|
*/
|
|
@@ -7,6 +7,11 @@ import expo.modules.kotlin.sharedobjects.SharedRef
|
|
|
7
7
|
internal class NativeStatement : SharedRef<NativeStatementBinding>(NativeStatementBinding()) {
|
|
8
8
|
var isFinalized = false
|
|
9
9
|
|
|
10
|
+
override fun deallocate() {
|
|
11
|
+
super.deallocate()
|
|
12
|
+
this.ref.close()
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
override fun equals(other: Any?): Boolean {
|
|
11
16
|
return other is NativeStatement && this.ref == other.ref
|
|
12
17
|
}
|
|
@@ -4,13 +4,14 @@ package expo.modules.sqlite
|
|
|
4
4
|
|
|
5
5
|
import com.facebook.jni.HybridData
|
|
6
6
|
import expo.modules.core.interfaces.DoNotStrip
|
|
7
|
+
import java.io.Closeable
|
|
7
8
|
|
|
8
9
|
internal typealias SQLiteColumnNames = ArrayList<String>
|
|
9
10
|
internal typealias SQLiteColumnValues = ArrayList<Any>
|
|
10
11
|
|
|
11
12
|
@Suppress("KotlinJniMissingFunction")
|
|
12
13
|
@DoNotStrip
|
|
13
|
-
internal class NativeStatementBinding {
|
|
14
|
+
internal class NativeStatementBinding : Closeable {
|
|
14
15
|
@DoNotStrip
|
|
15
16
|
private val mHybridData: HybridData
|
|
16
17
|
|
|
@@ -18,6 +19,10 @@ internal class NativeStatementBinding {
|
|
|
18
19
|
mHybridData = initHybrid()
|
|
19
20
|
}
|
|
20
21
|
|
|
22
|
+
override fun close() {
|
|
23
|
+
mHybridData.resetNative()
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
// region sqlite3 bindings
|
|
22
27
|
|
|
23
28
|
external fun sqlite3_bind_parameter_index(name: String): Int
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-sqlite",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.2",
|
|
4
4
|
"description": "Provides access to a database that can be queried through a WebSQL-like API (https://www.w3.org/TR/webdatabase/). The database is persisted across restarts of your app.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"expo": "*"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "36402c8b2bc9b63f003c04642d97bf091b35fe16"
|
|
51
51
|
}
|