@powersync/op-sqlite 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/op-sqlite",
3
- "version": "0.0.6",
3
+ "version": "0.1.0",
4
4
  "description": "PowerSync - sync Postgres or MongoDB with SQLite in your React Native app for offline-first and real-time data",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./lib/commonjs/index.js",
@@ -59,13 +59,13 @@
59
59
  },
60
60
  "peerDependencies": {
61
61
  "@op-engineering/op-sqlite": "^9.2.1",
62
- "@powersync/common": "^1.20.1",
62
+ "@powersync/common": "^1.21.0",
63
63
  "react": "*",
64
64
  "react-native": "*"
65
65
  },
66
66
  "dependencies": {
67
67
  "async-lock": "^1.4.0",
68
- "@powersync/common": "1.20.1"
68
+ "@powersync/common": "1.21.0"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@op-engineering/op-sqlite": "^9.2.1",
@@ -79,4 +79,8 @@ export class OPSQLiteConnection extends BaseObserver<DBAdapterListener> {
79
79
  }
80
80
  return result as T;
81
81
  }
82
+
83
+ async refreshSchema() {
84
+ await this.get("PRAGMA table_info('sqlite_master')");
85
+ }
82
86
  }
@@ -271,4 +271,13 @@ export class OPSQLiteDBAdapter extends BaseObserver<DBAdapterListener> implement
271
271
  throw ex;
272
272
  }
273
273
  }
274
+
275
+ async refreshSchema(): Promise<void> {
276
+ await this.initialized;
277
+ await this.writeConnection!.refreshSchema();
278
+
279
+ for (let readConnection of this.readConnections) {
280
+ await readConnection.connection.refreshSchema();
281
+ }
282
+ }
274
283
  }