File tree Expand file tree Collapse file tree 1 file changed +4
-23
lines changed
packages/powersync-op-sqlite Expand file tree Collapse file tree 1 file changed +4
-23
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,7 @@ To load additional SQLite extensions include the `extensions` option in `sqliteO
74
74
75
75
``` js
76
76
sqliteOptions: {
77
- extensions: [
78
- { path: libPath, entryPoint: ' sqlite3_powersync_init' }
79
- ]
77
+ extensions: [{ path: libPath, entryPoint: ' sqlite3_powersync_init' }];
80
78
}
81
79
```
82
80
@@ -87,38 +85,21 @@ Example usage:
87
85
``` ts
88
86
import { getDylibPath } from ' @op-engineering/op-sqlite' ;
89
87
90
- let libPath: string
88
+ let libPath: string ;
91
89
if (Platform .OS === ' ios' ) {
92
- libPath = getDylibPath (' co.powersync.sqlitecore' , ' powersync-sqlite-core' )
90
+ libPath = getDylibPath (' co.powersync.sqlitecore' , ' powersync-sqlite-core' );
93
91
} else {
94
92
libPath = ' libpowersync' ;
95
93
}
96
94
97
95
const factory = new OPSqliteOpenFactory ({
98
96
dbFilename: ' sqlite.db' ,
99
97
sqliteOptions: {
100
- extensions: [
101
- { path: libPath , entryPoint: ' sqlite3_powersync_init' }
102
- ]
98
+ extensions: [{ path: libPath , entryPoint: ' sqlite3_powersync_init' }]
103
99
}
104
100
});
105
101
```
106
102
107
- ## Using the Memory Temporary Store
108
-
109
- For some targets like Android 12/API 31, syncing of large datasets may cause disk IO errors due to the default temporary store option (file) used.
110
- To resolve this you can use the ` memory ` option, by adding the following configuration option to your application's ` package.json `
111
-
112
- ``` json
113
- {
114
- // your normal package.json
115
- // ...
116
- "op-sqlite" : {
117
- "sqliteFlags" : " -DSQLITE_TEMP_STORE=2"
118
- }
119
- }
120
- ```
121
-
122
103
## Native Projects
123
104
124
105
This package uses native libraries. Create native Android and iOS projects (if not created already) by running:
You can’t perform that action at this time.
0 commit comments