ORM Support
Drizzle
npm: @powersync/drizzle-driver
This package enables using Drizzle with the PowerSync React Native and JavaScript Web SDKs.
Setup
Set up the PowerSync Database and wrap it with Drizzle.
Currently, you need to create the Drizzle schema manually, and it should match the table definitions of your PowerSync client-side schema.
Compilable queries
To use Drizzle queries in your hooks and composables, they currently need to be converted using toCompilableQuery
.
Usage Examples
Below are examples comparing Drizzle and PowerSync syntax for common database operations.
Select Operations
Insert Operations
Delete Operations
Update Operations
Watched Queries
Transactions
Was this page helpful?