We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 95a6e43 commit 4a2c27dCopy full SHA for 4a2c27d
1 file changed
README.md
@@ -54,10 +54,21 @@ interface ISQLite {
54
insertId?: number;
55
};
56
}
57
+```
58
+
59
+In your code
60
61
+```typescript
62
+// If you want to register the (globalThis) types for the low level API do an empty import
63
+import 'react-native-quick-sqlite';
64
65
// `sqlite` is a globally registered object, so you can directly call it from anywhere in your javascript
66
// The methods `throw` when an execution error happens, so try/catch them
-sqlite.open('myDatabase', 'databases');
67
+try {
68
+ sqlite.open('myDatabase', 'databases');
69
+} catch (e) {
70
+ console.log(e); // [react-native-quick-sqlite]: Could not open database file: ERR XXX
71
+}
72
```
73
74
## License
0 commit comments