expo-sqlite 12.2.0 → 13.0.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/CHANGELOG.md +22 -0
- package/android/CMakeLists.txt +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/cpp/NativeStatementBinding.cpp +16 -15
- package/android/src/main/java/expo/modules/sqlite/NativeDatabase.kt +2 -0
- package/android/src/main/java/expo/modules/sqlite/NativeStatement.kt +2 -0
- package/android/src/main/java/expo/modules/sqlite/SQLExceptions.kt +6 -0
- package/android/src/main/java/expo/modules/sqlite/SQLiteModuleNext.kt +98 -95
- package/build/next/NativeStatement.d.ts +9 -13
- package/build/next/NativeStatement.d.ts.map +1 -1
- package/build/next/NativeStatement.js.map +1 -1
- package/build/next/Statement.d.ts +4 -6
- package/build/next/Statement.d.ts.map +1 -1
- package/build/next/Statement.js +36 -47
- package/build/next/Statement.js.map +1 -1
- package/ios/Exceptions.swift +12 -0
- package/ios/NativeDatabase.swift +1 -0
- package/ios/NativeStatement.swift +1 -0
- package/ios/SQLiteModule.swift +3 -4
- package/ios/SQLiteModuleNext.swift +108 -92
- package/ios/crsqlite.xcframework/Info.plist +4 -0
- package/ios/crsqlite.xcframework/ios-arm64/crsqlite.framework/Info.plist +4 -0
- package/package.json +2 -2
- package/src/next/NativeStatement.ts +36 -22
- package/src/next/Statement.ts +54 -49
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,28 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 13.0.0 — 2023-12-12
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- Added binary data support to the `expo-sqlite/next` API through the `Uint8Array`. ([#25787](https://github.com/expo/expo/pull/25787) by [@kudo](https://github.com/kudo))
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Fixed `expo-sqlite/next` crashes when access to finalized statements. ([#25623](https://github.com/expo/expo/pull/25623) by [@kudo](https://github.com/kudo))
|
|
22
|
+
- Fixed `expo-sqlite/next` UTF-8 text issue and `:memory:` database issue. ([#25637](https://github.com/expo/expo/pull/25637) by [@kudo](https://github.com/kudo))
|
|
23
|
+
|
|
24
|
+
### 💡 Others
|
|
25
|
+
|
|
26
|
+
- [iOS] Replace legacy `FileSystem` interfaces usage with core `FileSystemUtilities`. ([#25495](https://github.com/expo/expo/pull/25495) by [@alanhughes](https://github.com/alanjhughes))
|
|
27
|
+
- Bump C++ compiler setting to C++20. ([#25548](https://github.com/expo/expo/pull/25548) by [@kudo](https://github.com/kudo))
|
|
28
|
+
|
|
29
|
+
## 12.2.1 — 2023-11-18
|
|
30
|
+
|
|
31
|
+
### 🐛 Bug fixes
|
|
32
|
+
|
|
33
|
+
- Fixed `expo-sqlite/next` integer overflow crashes on iOS. ([#25322](https://github.com/expo/expo/pull/25322) by [@peterferguson](https://github.com/peterferguson))
|
|
34
|
+
|
|
13
35
|
## 12.2.0 — 2023-11-14
|
|
14
36
|
|
|
15
37
|
### 🐛 Bug fixes
|
package/android/CMakeLists.txt
CHANGED
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 = '
|
|
7
|
+
version = '13.0.0'
|
|
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 "
|
|
109
|
+
versionName "13.0.0"
|
|
110
110
|
|
|
111
111
|
externalNativeBuild {
|
|
112
112
|
cmake {
|
|
@@ -60,31 +60,30 @@ int NativeStatementBinding::sqlite3_step() { return ::sqlite3_step(stmt); }
|
|
|
60
60
|
|
|
61
61
|
int NativeStatementBinding::bindStatementParam(
|
|
62
62
|
int index, jni::alias_ref<jni::JObject> param) {
|
|
63
|
-
static const auto integerClass = jni::JInteger::javaClassStatic();
|
|
64
|
-
static const auto longClass = jni::JLong::javaClassStatic();
|
|
65
|
-
static const auto doubleClass = jni::JDouble::javaClassStatic();
|
|
66
|
-
static const auto stringClass = jni::JString::javaClassStatic();
|
|
67
|
-
static const auto booleanClass = jni::JBoolean::javaClassStatic();
|
|
68
|
-
|
|
69
63
|
int ret = -1;
|
|
70
64
|
if (param == nullptr) {
|
|
71
65
|
ret = sqlite3_bind_null(stmt, index);
|
|
72
|
-
} else if (param->isInstanceOf(
|
|
66
|
+
} else if (param->isInstanceOf(jni::JInteger::javaClassStatic())) {
|
|
73
67
|
ret = sqlite3_bind_int(stmt, index,
|
|
74
68
|
jni::static_ref_cast<jni::JInteger>(param)->value());
|
|
75
|
-
} else if (param->isInstanceOf(
|
|
69
|
+
} else if (param->isInstanceOf(jni::JLong::javaClassStatic())) {
|
|
76
70
|
ret = sqlite3_bind_int64(stmt, index,
|
|
77
71
|
jni::static_ref_cast<jni::JLong>(param)->value());
|
|
78
|
-
} else if (param->isInstanceOf(
|
|
72
|
+
} else if (param->isInstanceOf(jni::JDouble::javaClassStatic())) {
|
|
79
73
|
ret = sqlite3_bind_double(
|
|
80
74
|
stmt, index, jni::static_ref_cast<jni::JDouble>(param)->value());
|
|
81
|
-
} else if (param->isInstanceOf(
|
|
75
|
+
} else if (param->isInstanceOf(jni::JBoolean::javaClassStatic())) {
|
|
82
76
|
ret = sqlite3_bind_int(
|
|
83
77
|
stmt, index,
|
|
84
78
|
jni::static_ref_cast<jni::JBoolean>(param)->value() ? 1 : 0);
|
|
79
|
+
} else if (param->isInstanceOf(jni::JArrayByte::javaClassStatic())) {
|
|
80
|
+
auto byteArray = jni::static_ref_cast<jni::JArrayByte>(param);
|
|
81
|
+
auto data = byteArray->getRegion(0, byteArray->size());
|
|
82
|
+
ret = sqlite3_bind_blob(stmt, index, data.get(), byteArray->size(),
|
|
83
|
+
SQLITE_TRANSIENT);
|
|
85
84
|
} else {
|
|
86
85
|
std::string stringArg;
|
|
87
|
-
if (param->isInstanceOf(
|
|
86
|
+
if (param->isInstanceOf(jni::JString::javaClassStatic())) {
|
|
88
87
|
stringArg = jni::static_ref_cast<jni::JString>(param)->toStdString();
|
|
89
88
|
} else {
|
|
90
89
|
stringArg = param->toString();
|
|
@@ -137,10 +136,12 @@ jni::local_ref<jni::JObject> NativeStatementBinding::getColumnValue(int index) {
|
|
|
137
136
|
return jni::make_jstring(text);
|
|
138
137
|
}
|
|
139
138
|
case SQLITE_BLOB: {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
size_t length = static_cast<size_t>(sqlite3_column_bytes(stmt, index));
|
|
140
|
+
auto byteArray = jni::JArrayByte::newArray(length);
|
|
141
|
+
byteArray->setRegion(
|
|
142
|
+
0, length,
|
|
143
|
+
static_cast<const signed char *>(sqlite3_column_blob(stmt, index)));
|
|
144
|
+
return byteArray;
|
|
144
145
|
}
|
|
145
146
|
case SQLITE_NULL: {
|
|
146
147
|
return nullptr;
|
|
@@ -5,6 +5,8 @@ package expo.modules.sqlite
|
|
|
5
5
|
import expo.modules.kotlin.sharedobjects.SharedRef
|
|
6
6
|
|
|
7
7
|
internal class NativeDatabase(val dbName: String, val openOptions: OpenDatabaseOptions) : SharedRef<NativeDatabaseBinding>(NativeDatabaseBinding()) {
|
|
8
|
+
var isClosed = false
|
|
9
|
+
|
|
8
10
|
override fun equals(other: Any?): Boolean {
|
|
9
11
|
return other is NativeDatabase && this.ref == other.ref
|
|
10
12
|
}
|
|
@@ -5,6 +5,8 @@ package expo.modules.sqlite
|
|
|
5
5
|
import expo.modules.kotlin.sharedobjects.SharedRef
|
|
6
6
|
|
|
7
7
|
internal class NativeStatement : SharedRef<NativeStatementBinding>(NativeStatementBinding()) {
|
|
8
|
+
var isFinalized = false
|
|
9
|
+
|
|
8
10
|
override fun equals(other: Any?): Boolean {
|
|
9
11
|
return other is NativeStatement && this.ref == other.ref
|
|
10
12
|
}
|
|
@@ -24,3 +24,9 @@ internal class SQLiteErrorException(message: String) :
|
|
|
24
24
|
@DoNotStrip
|
|
25
25
|
internal class InvalidConvertibleException(message: String) :
|
|
26
26
|
CodedException(message)
|
|
27
|
+
|
|
28
|
+
internal class AccessClosedResourceException :
|
|
29
|
+
CodedException("Access to closed resource")
|
|
30
|
+
|
|
31
|
+
internal class InvalidBindParameterException :
|
|
32
|
+
CodedException("Invalid bind parameter")
|
|
@@ -11,6 +11,8 @@ import expo.modules.kotlin.modules.ModuleDefinition
|
|
|
11
11
|
import java.io.File
|
|
12
12
|
import java.io.IOException
|
|
13
13
|
|
|
14
|
+
private const val MEMORY_DB_NAME = ":memory:"
|
|
15
|
+
|
|
14
16
|
@Suppress("unused")
|
|
15
17
|
class SQLiteModuleNext : Module() {
|
|
16
18
|
private val cachedDatabases: MutableList<NativeDatabase> = mutableListOf()
|
|
@@ -73,9 +75,11 @@ class SQLiteModuleNext : Module() {
|
|
|
73
75
|
}
|
|
74
76
|
|
|
75
77
|
AsyncFunction("isInTransactionAsync") { database: NativeDatabase ->
|
|
78
|
+
maybeThrowForClosedDatabase(database)
|
|
76
79
|
return@AsyncFunction database.ref.sqlite3_get_autocommit() == 0
|
|
77
80
|
}
|
|
78
81
|
Function("isInTransactionSync") { database: NativeDatabase ->
|
|
82
|
+
maybeThrowForClosedDatabase(database)
|
|
79
83
|
return@Function database.ref.sqlite3_get_autocommit() == 0
|
|
80
84
|
}
|
|
81
85
|
|
|
@@ -108,52 +112,33 @@ class SQLiteModuleNext : Module() {
|
|
|
108
112
|
return@Constructor NativeStatement()
|
|
109
113
|
}
|
|
110
114
|
|
|
111
|
-
AsyncFunction("
|
|
112
|
-
return@AsyncFunction
|
|
115
|
+
AsyncFunction("runAsync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean ->
|
|
116
|
+
return@AsyncFunction run(statement, database, bindParams, bindBlobParams, shouldPassAsArray)
|
|
113
117
|
}
|
|
114
|
-
Function("
|
|
115
|
-
return@Function
|
|
118
|
+
Function("runSync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean ->
|
|
119
|
+
return@Function run(statement, database, bindParams, bindBlobParams, shouldPassAsArray)
|
|
116
120
|
}
|
|
117
121
|
|
|
118
|
-
AsyncFunction("
|
|
119
|
-
return@AsyncFunction
|
|
122
|
+
AsyncFunction("getAsync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean ->
|
|
123
|
+
return@AsyncFunction get(statement, database, bindParams, bindBlobParams, shouldPassAsArray)
|
|
120
124
|
}
|
|
121
|
-
Function("
|
|
122
|
-
return@Function
|
|
125
|
+
Function("getSync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean ->
|
|
126
|
+
return@Function get(statement, database, bindParams, bindBlobParams, shouldPassAsArray)
|
|
123
127
|
}
|
|
124
128
|
|
|
125
|
-
AsyncFunction("
|
|
126
|
-
return@AsyncFunction
|
|
129
|
+
AsyncFunction("getAllAsync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean ->
|
|
130
|
+
return@AsyncFunction getAll(statement, database, bindParams, bindBlobParams, shouldPassAsArray)
|
|
127
131
|
}
|
|
128
|
-
Function("
|
|
129
|
-
return@Function
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
AsyncFunction("objectGetAsync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any> ->
|
|
133
|
-
return@AsyncFunction objectGet(statement, database, bindParams)
|
|
134
|
-
}
|
|
135
|
-
Function("objectGetSync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any> ->
|
|
136
|
-
return@Function objectGet(statement, database, bindParams)
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
AsyncFunction("arrayGetAllAsync") { statement: NativeStatement, database: NativeDatabase, bindParams: List<Any> ->
|
|
140
|
-
return@AsyncFunction arrayGetAll(statement, database, bindParams)
|
|
141
|
-
}
|
|
142
|
-
Function("arrayGetAllSync") { statement: NativeStatement, database: NativeDatabase, bindParams: List<Any> ->
|
|
143
|
-
return@Function arrayGetAll(statement, database, bindParams)
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
AsyncFunction("objectGetAllAsync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any> ->
|
|
147
|
-
return@AsyncFunction objectGetAll(statement, database, bindParams)
|
|
148
|
-
}
|
|
149
|
-
Function("objectGetAllSync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any> ->
|
|
150
|
-
return@Function objectGetAll(statement, database, bindParams)
|
|
132
|
+
Function("getAllSync") { statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean ->
|
|
133
|
+
return@Function getAll(statement, database, bindParams, bindBlobParams, shouldPassAsArray)
|
|
151
134
|
}
|
|
152
135
|
|
|
153
136
|
AsyncFunction("getColumnNamesAsync") { statement: NativeStatement ->
|
|
137
|
+
maybeThrowForFinalizedStatement(statement)
|
|
154
138
|
return@AsyncFunction statement.ref.getColumnNames()
|
|
155
139
|
}
|
|
156
140
|
Function("getColumnNamesSync") { statement: NativeStatement ->
|
|
141
|
+
maybeThrowForFinalizedStatement(statement)
|
|
157
142
|
return@Function statement.ref.getColumnNames()
|
|
158
143
|
}
|
|
159
144
|
|
|
@@ -175,6 +160,9 @@ class SQLiteModuleNext : Module() {
|
|
|
175
160
|
|
|
176
161
|
@Throws(OpenDatabaseException::class)
|
|
177
162
|
private fun pathForDatabaseName(name: String): String {
|
|
163
|
+
if (name == MEMORY_DB_NAME) {
|
|
164
|
+
return name
|
|
165
|
+
}
|
|
178
166
|
try {
|
|
179
167
|
val directory = File("${context.filesDir}${File.separator}SQLite")
|
|
180
168
|
ensureDirExists(directory)
|
|
@@ -184,7 +172,9 @@ class SQLiteModuleNext : Module() {
|
|
|
184
172
|
}
|
|
185
173
|
}
|
|
186
174
|
|
|
175
|
+
@Throws(AccessClosedResourceException::class)
|
|
187
176
|
private fun initDb(database: NativeDatabase) {
|
|
177
|
+
maybeThrowForClosedDatabase(database)
|
|
188
178
|
if (database.openOptions.enableCRSQLite) {
|
|
189
179
|
loadCRSQLiteExtension(database)
|
|
190
180
|
}
|
|
@@ -193,40 +183,37 @@ class SQLiteModuleNext : Module() {
|
|
|
193
183
|
}
|
|
194
184
|
}
|
|
195
185
|
|
|
196
|
-
@Throws(SQLiteErrorException::class)
|
|
186
|
+
@Throws(AccessClosedResourceException::class, SQLiteErrorException::class)
|
|
197
187
|
private fun exec(database: NativeDatabase, source: String) {
|
|
188
|
+
maybeThrowForClosedDatabase(database)
|
|
198
189
|
database.ref.sqlite3_exec(source)
|
|
199
190
|
}
|
|
200
191
|
|
|
201
|
-
@Throws(SQLiteErrorException::class)
|
|
192
|
+
@Throws(AccessClosedResourceException::class, SQLiteErrorException::class)
|
|
202
193
|
private fun prepareStatement(database: NativeDatabase, statement: NativeStatement, source: String) {
|
|
194
|
+
maybeThrowForClosedDatabase(database)
|
|
195
|
+
maybeThrowForFinalizedStatement(statement)
|
|
203
196
|
database.ref.sqlite3_prepare_v2(source, statement.ref)
|
|
204
197
|
maybeAddCachedStatement(database, statement)
|
|
205
198
|
}
|
|
206
199
|
|
|
207
|
-
@Throws(SQLiteErrorException::class)
|
|
208
|
-
private fun
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
200
|
+
@Throws(AccessClosedResourceException::class, SQLiteErrorException::class)
|
|
201
|
+
private fun run(statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean): Map<String, Int> {
|
|
202
|
+
maybeThrowForClosedDatabase(database)
|
|
203
|
+
maybeThrowForFinalizedStatement(statement)
|
|
204
|
+
for ((key, param) in bindParams) {
|
|
205
|
+
val index = getBindParamIndex(statement, key, shouldPassAsArray)
|
|
206
|
+
if (index > 0) {
|
|
207
|
+
statement.ref.bindStatementParam(index, param)
|
|
208
|
+
}
|
|
215
209
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
"changes" to database.ref.sqlite3_changes(),
|
|
219
|
-
)
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
@Throws(SQLiteErrorException::class)
|
|
223
|
-
private fun objectRun(statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>): Map<String, Int> {
|
|
224
|
-
for ((name, param) in bindParams) {
|
|
225
|
-
val index = statement.ref.sqlite3_bind_parameter_index(name)
|
|
210
|
+
for ((key, param) in bindBlobParams) {
|
|
211
|
+
val index = getBindParamIndex(statement, key, shouldPassAsArray)
|
|
226
212
|
if (index > 0) {
|
|
227
213
|
statement.ref.bindStatementParam(index, param)
|
|
228
214
|
}
|
|
229
215
|
}
|
|
216
|
+
|
|
230
217
|
val ret = statement.ref.sqlite3_step()
|
|
231
218
|
if (ret != NativeDatabaseBinding.SQLITE_ROW && ret != NativeDatabaseBinding.SQLITE_DONE) {
|
|
232
219
|
throw SQLiteErrorException(database.ref.convertSqlLiteErrorToString())
|
|
@@ -237,29 +224,23 @@ class SQLiteModuleNext : Module() {
|
|
|
237
224
|
)
|
|
238
225
|
}
|
|
239
226
|
|
|
240
|
-
@Throws(InvalidConvertibleException::class, SQLiteErrorException::class)
|
|
241
|
-
private fun
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
if (ret != NativeDatabaseBinding.SQLITE_DONE) {
|
|
250
|
-
throw SQLiteErrorException(database.ref.convertSqlLiteErrorToString())
|
|
227
|
+
@Throws(AccessClosedResourceException::class, InvalidConvertibleException::class, SQLiteErrorException::class)
|
|
228
|
+
private fun get(statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean): ColumnValues? {
|
|
229
|
+
maybeThrowForClosedDatabase(database)
|
|
230
|
+
maybeThrowForFinalizedStatement(statement)
|
|
231
|
+
for ((key, param) in bindParams) {
|
|
232
|
+
val index = getBindParamIndex(statement, key, shouldPassAsArray)
|
|
233
|
+
if (index > 0) {
|
|
234
|
+
statement.ref.bindStatementParam(index, param)
|
|
235
|
+
}
|
|
251
236
|
}
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
@Throws(InvalidConvertibleException::class, SQLiteErrorException::class)
|
|
256
|
-
private fun objectGet(statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>): ColumnValues? {
|
|
257
|
-
for ((name, param) in bindParams) {
|
|
258
|
-
val index = statement.ref.sqlite3_bind_parameter_index(name)
|
|
237
|
+
for ((key, param) in bindBlobParams) {
|
|
238
|
+
val index = getBindParamIndex(statement, key, shouldPassAsArray)
|
|
259
239
|
if (index > 0) {
|
|
260
240
|
statement.ref.bindStatementParam(index, param)
|
|
261
241
|
}
|
|
262
242
|
}
|
|
243
|
+
|
|
263
244
|
val ret = statement.ref.sqlite3_step()
|
|
264
245
|
if (ret == NativeDatabaseBinding.SQLITE_ROW) {
|
|
265
246
|
return statement.ref.getColumnValues()
|
|
@@ -270,33 +251,23 @@ class SQLiteModuleNext : Module() {
|
|
|
270
251
|
return null
|
|
271
252
|
}
|
|
272
253
|
|
|
273
|
-
@Throws(InvalidConvertibleException::class, SQLiteErrorException::class)
|
|
274
|
-
private fun
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
if (ret == NativeDatabaseBinding.SQLITE_ROW) {
|
|
282
|
-
columnValuesList.add(statement.ref.getColumnValues())
|
|
283
|
-
continue
|
|
284
|
-
} else if (ret == NativeDatabaseBinding.SQLITE_DONE) {
|
|
285
|
-
break
|
|
254
|
+
@Throws(AccessClosedResourceException::class, InvalidConvertibleException::class, SQLiteErrorException::class)
|
|
255
|
+
private fun getAll(statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>, bindBlobParams: Map<String, ByteArray>, shouldPassAsArray: Boolean): List<ColumnValues> {
|
|
256
|
+
maybeThrowForClosedDatabase(database)
|
|
257
|
+
maybeThrowForFinalizedStatement(statement)
|
|
258
|
+
for ((key, param) in bindParams) {
|
|
259
|
+
val index = getBindParamIndex(statement, key, shouldPassAsArray)
|
|
260
|
+
if (index > 0) {
|
|
261
|
+
statement.ref.bindStatementParam(index, param)
|
|
286
262
|
}
|
|
287
|
-
throw SQLiteErrorException(database.ref.convertSqlLiteErrorToString())
|
|
288
263
|
}
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
@Throws(InvalidConvertibleException::class, SQLiteErrorException::class)
|
|
293
|
-
private fun objectGetAll(statement: NativeStatement, database: NativeDatabase, bindParams: Map<String, Any>): List<ColumnValues> {
|
|
294
|
-
for ((name, param) in bindParams) {
|
|
295
|
-
val index = statement.ref.sqlite3_bind_parameter_index(name)
|
|
264
|
+
for ((key, param) in bindBlobParams) {
|
|
265
|
+
val index = getBindParamIndex(statement, key, shouldPassAsArray)
|
|
296
266
|
if (index > 0) {
|
|
297
267
|
statement.ref.bindStatementParam(index, param)
|
|
298
268
|
}
|
|
299
269
|
}
|
|
270
|
+
|
|
300
271
|
val columnValuesList = mutableListOf<ColumnValues>()
|
|
301
272
|
while (true) {
|
|
302
273
|
val ret = statement.ref.sqlite3_step()
|
|
@@ -311,19 +282,24 @@ class SQLiteModuleNext : Module() {
|
|
|
311
282
|
return columnValuesList
|
|
312
283
|
}
|
|
313
284
|
|
|
314
|
-
@Throws(SQLiteErrorException::class)
|
|
285
|
+
@Throws(AccessClosedResourceException::class, SQLiteErrorException::class)
|
|
315
286
|
private fun reset(statement: NativeStatement, database: NativeDatabase) {
|
|
287
|
+
maybeThrowForClosedDatabase(database)
|
|
288
|
+
maybeThrowForFinalizedStatement(statement)
|
|
316
289
|
if (statement.ref.sqlite3_reset() != NativeDatabaseBinding.SQLITE_OK) {
|
|
317
290
|
throw SQLiteErrorException(database.ref.convertSqlLiteErrorToString())
|
|
318
291
|
}
|
|
319
292
|
}
|
|
320
293
|
|
|
321
|
-
@Throws(SQLiteErrorException::class)
|
|
294
|
+
@Throws(AccessClosedResourceException::class, SQLiteErrorException::class)
|
|
322
295
|
private fun finalize(statement: NativeStatement, database: NativeDatabase) {
|
|
296
|
+
maybeThrowForClosedDatabase(database)
|
|
297
|
+
maybeThrowForFinalizedStatement(statement)
|
|
323
298
|
maybeRemoveCachedStatement(database, statement)
|
|
324
299
|
if (statement.ref.sqlite3_finalize() != NativeDatabaseBinding.SQLITE_OK) {
|
|
325
300
|
throw SQLiteErrorException(database.ref.convertSqlLiteErrorToString())
|
|
326
301
|
}
|
|
302
|
+
statement.isFinalized = true
|
|
327
303
|
}
|
|
328
304
|
|
|
329
305
|
private fun loadCRSQLiteExtension(database: NativeDatabase) {
|
|
@@ -357,8 +333,9 @@ class SQLiteModuleNext : Module() {
|
|
|
357
333
|
}
|
|
358
334
|
}
|
|
359
335
|
|
|
360
|
-
@Throws(SQLiteErrorException::class)
|
|
336
|
+
@Throws(AccessClosedResourceException::class, SQLiteErrorException::class)
|
|
361
337
|
private fun closeDatabase(database: NativeDatabase) {
|
|
338
|
+
maybeThrowForClosedDatabase(database)
|
|
362
339
|
maybeRemoveAllCachedStatements(database).forEach {
|
|
363
340
|
it.ref.sqlite3_finalize()
|
|
364
341
|
}
|
|
@@ -369,6 +346,7 @@ class SQLiteModuleNext : Module() {
|
|
|
369
346
|
if (ret != NativeDatabaseBinding.SQLITE_OK) {
|
|
370
347
|
throw SQLiteErrorException(database.ref.convertSqlLiteErrorToString())
|
|
371
348
|
}
|
|
349
|
+
database.isClosed = true
|
|
372
350
|
}
|
|
373
351
|
|
|
374
352
|
private fun deleteDatabase(dbName: String) {
|
|
@@ -376,6 +354,9 @@ class SQLiteModuleNext : Module() {
|
|
|
376
354
|
throw DeleteDatabaseException(dbName)
|
|
377
355
|
}
|
|
378
356
|
|
|
357
|
+
if (dbName == MEMORY_DB_NAME) {
|
|
358
|
+
return
|
|
359
|
+
}
|
|
379
360
|
val dbFile = File(pathForDatabaseName(dbName))
|
|
380
361
|
if (!dbFile.exists()) {
|
|
381
362
|
throw DatabaseNotFoundException(dbName)
|
|
@@ -385,6 +366,28 @@ class SQLiteModuleNext : Module() {
|
|
|
385
366
|
}
|
|
386
367
|
}
|
|
387
368
|
|
|
369
|
+
@Throws(AccessClosedResourceException::class)
|
|
370
|
+
private fun maybeThrowForClosedDatabase(database: NativeDatabase) {
|
|
371
|
+
if (database.isClosed) {
|
|
372
|
+
throw AccessClosedResourceException()
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
@Throws(AccessClosedResourceException::class)
|
|
377
|
+
private fun maybeThrowForFinalizedStatement(statement: NativeStatement) {
|
|
378
|
+
if (statement.isFinalized) {
|
|
379
|
+
throw AccessClosedResourceException()
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@Throws(InvalidBindParameterException::class)
|
|
384
|
+
private fun getBindParamIndex(statement: NativeStatement, key: String, shouldPassAsArray: Boolean): Int =
|
|
385
|
+
if (shouldPassAsArray) {
|
|
386
|
+
(key.toIntOrNull() ?: throw InvalidBindParameterException()) + 1
|
|
387
|
+
} else {
|
|
388
|
+
statement.ref.sqlite3_bind_parameter_index(key)
|
|
389
|
+
}
|
|
390
|
+
|
|
388
391
|
// region cachedDatabases managements
|
|
389
392
|
|
|
390
393
|
@Synchronized
|
|
@@ -38,9 +38,11 @@ export interface RunResult {
|
|
|
38
38
|
* await statement.getAsync({ $value: 'test1', $intValue: 789 });
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
export type BindValue = string | number | null | boolean;
|
|
41
|
+
export type BindValue = string | number | null | boolean | Uint8Array;
|
|
42
42
|
export type BindParams = Record<string, BindValue> | BindValue[];
|
|
43
43
|
export type VariadicBindParams = BindValue[];
|
|
44
|
+
export type BindPrimitiveParams = Record<string, Exclude<BindValue, Uint8Array>>;
|
|
45
|
+
export type BindBlobParams = Record<string, Uint8Array>;
|
|
44
46
|
export type ColumnNames = string[];
|
|
45
47
|
export type ColumnValues = any[];
|
|
46
48
|
type AnyDatabase = any;
|
|
@@ -48,21 +50,15 @@ type AnyDatabase = any;
|
|
|
48
50
|
* A class that represents an instance of the SQLite statement.
|
|
49
51
|
*/
|
|
50
52
|
export declare class NativeStatement {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
objectGetAsync(database: AnyDatabase, params: BindParams): Promise<ColumnValues | null | undefined>;
|
|
55
|
-
arrayGetAllAsync(database: AnyDatabase, params: BindParams): Promise<ColumnValues[]>;
|
|
56
|
-
objectGetAllAsync(database: AnyDatabase, params: BindParams): Promise<ColumnValues[]>;
|
|
53
|
+
runAsync(database: AnyDatabase, bindParams: BindPrimitiveParams, bindBlobParams: BindBlobParams, shouldPassAsArray: boolean): Promise<RunResult>;
|
|
54
|
+
getAsync(database: AnyDatabase, bindParams: BindPrimitiveParams, bindBlobParams: BindBlobParams, shouldPassAsArray: boolean): Promise<ColumnValues | null | undefined>;
|
|
55
|
+
getAllAsync(database: AnyDatabase, bindParams: BindPrimitiveParams, bindBlobParams: BindBlobParams, shouldPassAsArray: boolean): Promise<ColumnValues[]>;
|
|
57
56
|
getColumnNamesAsync(): Promise<ColumnNames>;
|
|
58
57
|
resetAsync(database: AnyDatabase): Promise<void>;
|
|
59
58
|
finalizeAsync(database: AnyDatabase): Promise<void>;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
objectGetSync(database: AnyDatabase, params: BindParams): ColumnValues | null | undefined;
|
|
64
|
-
arrayGetAllSync(database: AnyDatabase, params: BindParams): ColumnValues[];
|
|
65
|
-
objectGetAllSync(database: AnyDatabase, params: BindParams): ColumnValues[];
|
|
59
|
+
runSync(database: AnyDatabase, bindParams: BindPrimitiveParams, bindBlobParams: BindBlobParams, shouldPassAsArray: boolean): RunResult;
|
|
60
|
+
getSync(database: AnyDatabase, bindParams: BindPrimitiveParams, bindBlobParams: BindBlobParams, shouldPassAsArray: boolean): ColumnValues | null | undefined;
|
|
61
|
+
getAllSync(database: AnyDatabase, bindParams: BindPrimitiveParams, bindBlobParams: BindBlobParams, shouldPassAsArray: boolean): ColumnValues[];
|
|
66
62
|
getColumnNamesSync(): string[];
|
|
67
63
|
resetSync(database: AnyDatabase): void;
|
|
68
64
|
finalizeSync(database: AnyDatabase): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeStatement.d.ts","sourceRoot":"","sources":["../../src/next/NativeStatement.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeStatement.d.ts","sourceRoot":"","sources":["../../src/next/NativeStatement.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAC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CAAC;IAMnD,OAAO,CACZ,QAAQ,EAAE,WAAW,EACrB,UAAU,EAAE,mBAAmB,EAC/B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,OAAO,GACzB,SAAS;IACL,OAAO,CACZ,QAAQ,EAAE,WAAW,EACrB,UAAU,EAAE,mBAAmB,EAC/B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,OAAO,GACzB,YAAY,GAAG,IAAI,GAAG,SAAS;IAC3B,UAAU,CACf,QAAQ,EAAE,WAAW,EACrB,UAAU,EAAE,mBAAmB,EAC/B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,OAAO,GACzB,YAAY,EAAE;IACV,kBAAkB,IAAI,MAAM,EAAE;IAE9B,SAAS,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;IACtC,YAAY,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI;CAGjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeStatement.js","sourceRoot":"","sources":["../../src/next/NativeStatement.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Result of a `runAsync` call.\n */\nexport interface RunResult {\n /**\n * The last inserted row ID.\n */\n lastInsertRowid: number;\n\n /**\n * The number of rows affected.\n */\n changes: number;\n}\n\n/**\n * Bind parameters to the prepared statement.\n * You can either pass the parameters in the following forms:\n *\n * @example\n * - A single array for unnamed parameters.\n * ```ts\n * const statement = await db.prepareAsync('SELECT * FROM test WHERE value = ? AND intValue = ?');\n * await statement.getAsync(['test1', 789]);\n * ```\n *\n * @example\n * - Variadic arguments for unnamed parameters.\n * ```ts\n * const statement = await db.prepareAsync('SELECT * FROM test WHERE value = ? AND intValue = ?');\n * await statement.getAsync('test1', 789);\n * ```\n *\n * @example\n * - A single object for [named parameters](https://www.sqlite.org/lang_expr.html)\n *\n * We support multiple named parameter forms such as `:VVV`, `@VVV`, and `$VVV`. We recommend using `$VVV` because JavaScript allows using `$` in identifiers without escaping.\n * ```ts\n * const statement = await db.prepareAsync('SELECT * FROM test WHERE value = $value AND intValue = $intValue');\n * await statement.getAsync({ $value: 'test1', $intValue: 789 });\n * ```\n */\nexport type BindValue = string | number | null | boolean;\nexport type BindParams = Record<string, BindValue> | BindValue[];\nexport type VariadicBindParams = BindValue[];\n\nexport type ColumnNames = string[];\nexport type ColumnValues = any[];\ntype AnyDatabase = any;\n\n/**\n * A class that represents an instance of the SQLite statement.\n */\nexport declare class NativeStatement {\n //#region Asynchronous API\n\n public
|
|
1
|
+
{"version":3,"file":"NativeStatement.js","sourceRoot":"","sources":["../../src/next/NativeStatement.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Result of a `runAsync` call.\n */\nexport interface RunResult {\n /**\n * The last inserted row ID.\n */\n lastInsertRowid: number;\n\n /**\n * The number of rows affected.\n */\n changes: number;\n}\n\n/**\n * Bind parameters to the prepared statement.\n * You can either pass the parameters in the following forms:\n *\n * @example\n * - A single array for unnamed parameters.\n * ```ts\n * const statement = await db.prepareAsync('SELECT * FROM test WHERE value = ? AND intValue = ?');\n * await statement.getAsync(['test1', 789]);\n * ```\n *\n * @example\n * - Variadic arguments for unnamed parameters.\n * ```ts\n * const statement = await db.prepareAsync('SELECT * FROM test WHERE value = ? AND intValue = ?');\n * await statement.getAsync('test1', 789);\n * ```\n *\n * @example\n * - A single object for [named parameters](https://www.sqlite.org/lang_expr.html)\n *\n * We support multiple named parameter forms such as `:VVV`, `@VVV`, and `$VVV`. We recommend using `$VVV` because JavaScript allows using `$` in identifiers without escaping.\n * ```ts\n * const statement = await db.prepareAsync('SELECT * FROM test WHERE value = $value AND intValue = $intValue');\n * await statement.getAsync({ $value: 'test1', $intValue: 789 });\n * ```\n */\nexport type BindValue = string | number | null | boolean | Uint8Array;\nexport type BindParams = Record<string, BindValue> | BindValue[];\nexport type VariadicBindParams = BindValue[];\n\nexport type BindPrimitiveParams = Record<string, Exclude<BindValue, Uint8Array>>;\nexport type BindBlobParams = Record<string, Uint8Array>;\nexport type ColumnNames = string[];\nexport type ColumnValues = any[];\ntype AnyDatabase = any;\n\n/**\n * A class that represents an instance of the SQLite statement.\n */\nexport declare class NativeStatement {\n //#region Asynchronous API\n\n public runAsync(\n database: AnyDatabase,\n bindParams: BindPrimitiveParams,\n bindBlobParams: BindBlobParams,\n shouldPassAsArray: boolean\n ): Promise<RunResult>;\n public getAsync(\n database: AnyDatabase,\n bindParams: BindPrimitiveParams,\n bindBlobParams: BindBlobParams,\n shouldPassAsArray: boolean\n ): Promise<ColumnValues | null | undefined>;\n public getAllAsync(\n database: AnyDatabase,\n bindParams: BindPrimitiveParams,\n bindBlobParams: BindBlobParams,\n shouldPassAsArray: boolean\n ): Promise<ColumnValues[]>;\n public getColumnNamesAsync(): Promise<ColumnNames>;\n\n public resetAsync(database: AnyDatabase): Promise<void>;\n public finalizeAsync(database: AnyDatabase): Promise<void>;\n\n //#endregion\n\n //#region Synchronous API\n\n public runSync(\n database: AnyDatabase,\n bindParams: BindPrimitiveParams,\n bindBlobParams: BindBlobParams,\n shouldPassAsArray: boolean\n ): RunResult;\n public getSync(\n database: AnyDatabase,\n bindParams: BindPrimitiveParams,\n bindBlobParams: BindBlobParams,\n shouldPassAsArray: boolean\n ): ColumnValues | null | undefined;\n public getAllSync(\n database: AnyDatabase,\n bindParams: BindPrimitiveParams,\n bindBlobParams: BindBlobParams,\n shouldPassAsArray: boolean\n ): ColumnValues[];\n public getColumnNamesSync(): string[];\n\n public resetSync(database: AnyDatabase): void;\n public finalizeSync(database: AnyDatabase): void;\n\n //#endregion\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NativeDatabase } from './NativeDatabase';
|
|
2
|
-
import { BindParams, BindValue, NativeStatement, RunResult, VariadicBindParams, type ColumnNames, type ColumnValues } from './NativeStatement';
|
|
2
|
+
import { BindBlobParams, BindParams, BindPrimitiveParams, BindValue, NativeStatement, RunResult, VariadicBindParams, type ColumnNames, type ColumnValues } from './NativeStatement';
|
|
3
3
|
export { BindParams, BindValue, RunResult, VariadicBindParams };
|
|
4
4
|
/**
|
|
5
5
|
* A prepared statement returned by [`Database.prepareAsync()`](#prepareasyncsource) or [`Database.prepareSync()`](#preparesyncsource) that can be binded with parameters and executed.
|
|
@@ -122,13 +122,11 @@ export declare class Statement {
|
|
|
122
122
|
finalizeSync(): void;
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
|
-
* Normalize the bind params to
|
|
125
|
+
* Normalize the bind params to data structure that can be passed to native module.
|
|
126
|
+
* The data structure is a tuple of [primitiveParams, blobParams, shouldPassAsArray].
|
|
126
127
|
* @hidden
|
|
127
128
|
*/
|
|
128
|
-
export declare function normalizeParams(...params: any[]):
|
|
129
|
-
params: BindParams;
|
|
130
|
-
shouldPassAsObject: boolean;
|
|
131
|
-
};
|
|
129
|
+
export declare function normalizeParams(...params: any[]): [BindPrimitiveParams, BindBlobParams, boolean];
|
|
132
130
|
/**
|
|
133
131
|
* Compose `columnNames` and `columnValues` to an row object.
|
|
134
132
|
* @hidden
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Statement.d.ts","sourceRoot":"","sources":["../../src/next/Statement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,UAAU,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;AAEhE;;GAEG;AACH,qBAAa,SAAS;IAElB,OAAO,CAAC,QAAQ,CAAC,cAAc;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe;gBADf,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe;IAKnD;;;OAGG;IACI,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,CAAC;IACvD;;OAE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