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
To enable SQLCipher you need to add the following configuration option to your application's `package.json`. Note that for [monorepos](https://op-engineering.github.io/op-sqlite/docs/installation) you may have to add this configuration to the monorepo root `package.json` instead, this depends on where your package manager tool hoists modules.
26
+
27
+
```json
28
+
{
29
+
// your normal package.json
30
+
// ...
31
+
"op-sqlite": {
32
+
"sqlcipher": true
33
+
}
34
+
}
35
+
```
36
+
37
+
Additionally you will need to add an [encryption key](https://www.zetetic.net/sqlcipher/sqlcipher-api/#key) to the OPSQLite factory constructor
38
+
39
+
```typescript
40
+
const db =newPowerSyncDatabase({
41
+
schema: newSchema(...),
42
+
database: {
43
+
dbFilename: 'sqlite.db',
44
+
sqliteOptions: {
45
+
encryptionKey: 'your-encryption-key'
46
+
}
47
+
}
48
+
});
49
+
```
50
+
51
+
### Full-Text Search
52
+
53
+
To enable the `fts5` extension, configure OP-SQLite in your (or for monorepos, the root) `package.json`:
54
+
55
+
```json
56
+
{
57
+
// your normal package.json
58
+
// ...
59
+
"op-sqlite": {
60
+
"fts5": true
61
+
}
62
+
}
63
+
```
64
+
65
+
### Loading SQLite extensions
66
+
67
+
To load additional SQLite extensions include the `extensions` option in `sqliteOptions` which expects an array of objects with a `path` and an `entryPoint`:
0 commit comments