Skip to content

Commit

Permalink
update readme. Fix for local only watches
Browse files Browse the repository at this point in the history
  • Loading branch information
stevensJourney committed Oct 30, 2023
1 parent dffdf1e commit 887acfd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/supabase-todolist
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB

const resolvedTables = options?.tables ?? [];
if (!options?.tables) {
// TODO get tables from sql if not specified
const explained = await this.getAll(`EXPLAIN ${sql}`, parameters);
const rootPages = _.chain(explained)
.filter((row) => row['opcode'] == 'OpenRead' && row['p3'] == 0 && _.isNumber(row['p2']))
Expand All @@ -403,7 +402,7 @@ export abstract class AbstractPowerSyncDatabase extends BaseObserver<PowerSyncDB
`SELECT tbl_name FROM sqlite_master WHERE rootpage IN (SELECT json_each.value FROM json_each(?))`,
[JSON.stringify(rootPages)]
);
tables.forEach((t) => resolvedTables.push(t.tbl_name.replace(/^ps_data__/, '')));
tables.forEach((t) => resolvedTables.push(t.tbl_name.replace(POWERSYNC_TABLE_MATCH, '')));
}
for await (const event of this.onChange({
...(options ?? {}),
Expand Down
2 changes: 1 addition & 1 deletion packages/powersync-sdk-react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ import 'react-native-polyfill-globals/auto';
```

```bash
npx expo install -D @babel/plugin-transform-async-generator-functions
npm install --save-dev @babel/plugin-transform-async-generator-functions
```

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

0 comments on commit 887acfd

Please sign in to comment.