Skip to content

Commit f7642c3

Browse files
author
Mike Mason
committed
Fix incorrect open function parameters. Improve explanation of defining flags for Android.
1 parent be9235e commit f7642c3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ TypeORM is officially supported, however, there is currently a parsing issue wit
2727
```typescript
2828
import {open} from 'react-native-quick-sqlite'
2929

30-
const db = open('myDb.sqlite')
30+
const db = open({ name: 'myDb.sqlite' })
31+
// Or: const db = open({ name: 'myDb.sqlite', location: '/some/location' })
32+
3133

3234
// The db object now contains the following methods:
3335

@@ -57,7 +59,7 @@ The basic query is **synchronous**, it will block rendering on large operations,
5759
import { open } from 'react-native-quick-sqlite';
5860

5961
try {
60-
const db = open('myDb.sqlite');
62+
const db = open({ name: 'myDb.sqlite' });
6163

6264
let { rows } = db.execute('SELECT somevalue FROM sometable');
6365

@@ -317,6 +319,12 @@ You can specify flags via `<PROJECT_ROOT>/android/gradle.properties` like so:
317319
quickSqliteFlags="<SQLITE_FLAGS>"
318320
```
319321

322+
Unlike with iOS, you must specify the `-D` prefix when defining your flags:
323+
324+
```
325+
quickSqliteFlags="-DSQLITE_ENABLE_FTS5=1"
326+
```
327+
320328
## Additional configuration
321329

322330
### App groups (iOS only)

0 commit comments

Comments
 (0)