Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions client-sdks/orms/js/drizzle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ For watched queries with Drizzle it's recommended to use the `watch()` function
<CodeGroup>
```js Drizzle
await db.transaction(async (transaction) => {
await db.insert(users).values({ id: "4", name: "James" });
await db
await transaction.insert(users).values({ id: "4", name: "James" });
await transaction
.update(users)
.set({ name: "Lucy James Smith" })
.where(eq(users.name, "James"));
Expand All @@ -283,7 +283,7 @@ For watched queries with Drizzle it's recommended to use the `watch()` function
```

```js PowerSync
await powerSyncDb.writeTransaction((transaction) => {
await powerSyncDb.writeTransaction(async (transaction) => {
await transaction.execute('INSERT INTO users (id, name) VALUES(4, ?)', ['James']);
await transaction.execute("UPDATE users SET name = ? WHERE name = ?", ['James Smith', 'James']);
})
Expand Down