Skip to content

Commit d908c12

Browse files
author
Oscar Franco
committed
Fix typos and ortography
1 parent cf38da3 commit d908c12

1 file changed

Lines changed: 12 additions & 10 deletions

File tree

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
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.
1818

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.
2020

2121
## Gotchas
2222

@@ -28,7 +28,7 @@ Compatible with [react-native-sqlite-storage](https://github.com/andpor/react-na
2828
```typescript
2929
/**
3030
* 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
3232
* status: 0 or undefined for correct execution, 1 for error
3333
* message: if status === 1, here you will find error description
3434
*/
@@ -287,7 +287,7 @@ const result = QuickSQLite.attach(
287287
'../databases'
288288
);
289289

290-
// Database is attached sucefully
290+
// Database is attached successfully
291291
if (!result.status) {
292292
const data = QuickSQLite.executeSql(
293293
'mainDatabase',
@@ -301,21 +301,19 @@ if (!result.status) {
301301
// You can detach databases at any moment
302302
const detachResult = QuickSQLite.detach('mainDatabase', 'stats');
303303
if (!detachResult.status) {
304-
// Database dettached
304+
// Database de-attached
305305
}
306306
```
307307

308308
## Use built-in SQLite
309309

310-
App size is a real concern for some teams.
311-
312-
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:
313311

314312
```
315313
QUICK_SQLITE_USE_PHONE_VERSION=1 npx pod-install
316314
```
317315

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.
319317

320318
## Use TypeORM
321319

@@ -336,11 +334,15 @@ If you are using Node 14+, TypeORM is currently broken with React Native. You ca
336334

337335
# Loading existing DBs
338336

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.
340342

341343
## More
342344

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/).
344346

345347
## License
346348

0 commit comments

Comments
 (0)