You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-10Lines changed: 12 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@
16
16
17
17
Quick SQLite embeds the latest version of SQLite and provides a low-level JSI-backed API to execute SQL queries. By using an embedded SQLite you get access the latest security patches and latest features.
18
18
19
-
Compatible with [react-native-sqlite-storage](https://github.com/andpor/react-native-sqlite-storage) and [react-native-sqlite2](https://github.com/craftzdog/react-native-sqlite-2). Performance metrics are intentionally not posted, [annecdotical testimonies](https://dev.to/craftzdog/a-performant-way-to-use-pouchdb7-on-react-native-in-2022-24ej) suggest anywhere between 2x and 5x speed improvement.
19
+
Compatible with [react-native-sqlite-storage](https://github.com/andpor/react-native-sqlite-storage) and [react-native-sqlite2](https://github.com/craftzdog/react-native-sqlite-2). Performance metrics are intentionally not posted, [anecdotic testimonies](https://dev.to/craftzdog/a-performant-way-to-use-pouchdb7-on-react-native-in-2022-24ej) suggest anywhere between 2x and 5x speed improvement.
20
20
21
21
## Gotchas
22
22
@@ -28,7 +28,7 @@ Compatible with [react-native-sqlite-storage](https://github.com/andpor/react-na
28
28
```typescript
29
29
/**
30
30
* All SQLite command results will have at least this status definition:
31
-
* Specific statments or actions can bring more data, relative to its context
31
+
* Specific statements or actions can bring more data, relative to its context
32
32
* status: 0 or undefined for correct execution, 1 for error
33
33
* message: if status === 1, here you will find error description
34
34
*/
@@ -287,7 +287,7 @@ const result = QuickSQLite.attach(
On iOS you can use the OS embedded SQLite instance, when running `pod-install` add an environment flag:
310
+
On iOS you can use the embedded SQLite, when running `pod-install` add an environment flag:
313
311
314
312
```
315
313
QUICK_SQLITE_USE_PHONE_VERSION=1 npx pod-install
316
314
```
317
315
318
-
On Android it is not possible to link using C++ to the phone's embedded SQLite. It is also a bad idea due to vendor changes, old android bugs, etc. The recommended way is to embed your own version of SQLite anyways. Unfortunately this means this library will add some mbs to your app size.
316
+
On Android it is not possible to link (using C++) the embedded SQLite. It is also a bad idea due to vendor changes, old android bugs, etc. Unfortunately this means this library will add some mbs to your app size.
319
317
320
318
## Use TypeORM
321
319
@@ -336,11 +334,15 @@ If you are using Node 14+, TypeORM is currently broken with React Native. You ca
336
334
337
335
# Loading existing DBs
338
336
339
-
The library creates/opens databases by appending the passed name plus, the [documents directory on iOS](https://github.com/ospfranco/react-native-quick-sqlite/blob/733e876d98896f5efc80f989ae38120f16533a66/ios/QuickSQLite.mm#L34-L35) and the [files directory on Android](https://github.com/ospfranco/react-native-quick-sqlite/blob/main/android/src/main/java/com/reactnativequicksqlite/QuickSQLiteBridge.java#L16), this might differ from other SQL libraries (some place it in a `www` folder). If you have an existing database file you want to load you can navigate from this directories using dot notation. e.g. `../www/myDb.sqlite`. Note that on iOS the file system is sand-boxed, so you cannot access files/directories not in your app bundle directories. You can place/move your database file using the many react-native fs libraries.
337
+
The library creates/opens databases by appending the passed name plus, the [documents directory on iOS](https://github.com/ospfranco/react-native-quick-sqlite/blob/733e876d98896f5efc80f989ae38120f16533a66/ios/QuickSQLite.mm#L34-L35) and the [files directory on Android](https://github.com/ospfranco/react-native-quick-sqlite/blob/main/android/src/main/java/com/reactnativequicksqlite/QuickSQLiteBridge.java#L16), this differs from other SQL libraries (some place it in a `www` folder, some in androids `databases` folder, etc.).
338
+
339
+
If you have an existing database file you want to load you can navigate from these directories using dot notation. e.g. `../www/myDb.sqlite`. Note that on iOS the file system is sand-boxed, so you cannot access files/directories not in your app bundle directories.
340
+
341
+
You can place/move your database file using the one of the many react-native fs libraries.
340
342
341
343
## More
342
344
343
-
If you want to learn how to make your own JSI module buy my [JSI/C++ Cheatsheet](http://ospfranco.gumroad.com/).
345
+
If you want to learn how to make your own JSI module buy my [JSI/C++ cheat sheet](http://ospfranco.gumroad.com/).
0 commit comments