Skip to content

Commit cbb320c

Browse files
committed
Changeset and more docs
1 parent 9f99c32 commit cbb320c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.changeset/rare-doors-repeat.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@powersync/common': minor
3+
'@powersync/node': minor
4+
'@powersync/capacitor': minor
5+
'@powersync/react-native': minor
6+
'@powersync/web': minor
7+
---
8+
9+
Improve raw tables by making `put` and `delete` statements optional if a local name is given.

packages/common/src/db/schema/Schema.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ export class Schema<S extends SchemaType = SchemaType> {
7979
};
8080
}
8181

82+
/**
83+
* Returns a representation of the raw table that is understood by the PowerSync SQLite core extension.
84+
*
85+
* The output of this can be passed through `JSON.serialize` and then used in `powersync_create_raw_table_crud_trigger`
86+
* to define triggers for this table.
87+
*/
8288
static rawTableToJson(table: RawTable): unknown {
8389
const serialized: any = {
8490
name: table.name,

0 commit comments

Comments
 (0)