Skip to content

Commit 887acfd

Browse files
update readme. Fix for local only watches
1 parent dffdf1e commit 887acfd

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

apps/supabase-todolist

packages/powersync-sdk-common/src/client/AbstractPowerSyncDatabase.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
393393

394394
const resolvedTables = options?.tables ?? [];
395395
if (!options?.tables) {
396-
// TODO get tables from sql if not specified
397396
const explained = await this.getAll(`EXPLAIN ${sql}`, parameters);
398397
const rootPages = _.chain(explained)
399398
.filter((row) => row['opcode'] == 'OpenRead' && row['p3'] == 0 && _.isNumber(row['p2']))
@@ -403,7 +402,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
403402
`SELECT tbl_name FROM sqlite_master WHERE rootpage IN (SELECT json_each.value FROM json_each(?))`,
404403
[JSON.stringify(rootPages)]
405404
);
406-
tables.forEach((t) => resolvedTables.push(t.tbl_name.replace(/^ps_data__/, '')));
405+
tables.forEach((t) => resolvedTables.push(t.tbl_name.replace(POWERSYNC_TABLE_MATCH, '')));
407406
}
408407
for await (const event of this.onChange({
409408
...(options ?? {}),

packages/powersync-sdk-react-native/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import 'react-native-polyfill-globals/auto';
6363
```
6464

6565
```bash
66-
npx expo install -D @babel/plugin-transform-async-generator-functions
66+
npm install --save-dev @babel/plugin-transform-async-generator-functions
6767
```
6868

6969
Add the Babel plugin to your `babel.config.js` file

0 commit comments

Comments
 (0)