Skip to content

Commit 16d59a5

Browse files
committed
Update tests
1 parent e913a63 commit 16d59a5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/core/src/views.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ mod test {
426426

427427
assert_eq!(
428428
stmt,
429-
r#"CREATE VIEW "table"("id", "a", "b") AS SELECT "id", CAST(json_extract(data, '$.a') as text), CAST(json_extract(data, '$.b') as integer) FROM "ps_data__table" -- powersync-auto-generated"#
429+
r#"CREATE VIEW "table"("id", "a", "b") AS SELECT id, CAST(json_extract(data, '$.a') as text), CAST(json_extract(data, '$.b') as integer) FROM "ps_data__table" -- powersync-auto-generated"#
430430
);
431431
}
432432

@@ -436,7 +436,10 @@ mod test {
436436

437437
assert_eq!(
438438
stmt,
439-
r#"CREATE TRIGGER "ps_view_delete_table" INSTEAD OF DELETE ON "table" FOR EACH ROW BEGIN DELETE FROM "ps_data__table" WHERE id = OLD.id; INSERT INTO powersync_crud(op,id,type) VALUES ('DELETE', OLD.id, 'table');END"#
439+
r#"CREATE TRIGGER "ps_view_delete_table" INSTEAD OF DELETE ON "table" FOR EACH ROW BEGIN
440+
DELETE FROM "ps_data__table" WHERE id = OLD.id;
441+
INSERT INTO powersync_crud(op,id,type) VALUES ('DELETE', OLD.id, 'table');
442+
END"#
440443
);
441444
}
442445

0 commit comments

Comments
 (0)