You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// As an alternative to manually defining a PowerSync schema, generate the local PowerSync schema from the Drizzle schema with the `DrizzleAppSchema` constructor:
51
+
// import { DrizzleAppSchema } from '@powersync/drizzle-driver';
52
+
// export const AppSchema = new DrizzleAppSchema(drizzleSchema);
53
+
//
54
+
// This is optional, but recommended, since you will only need to maintain one schema on the client-side
- The integration does not currently support nested transactions (also known as `savepoints`).
65
-
- The Drizzle schema needs to be created manually, and it should match the table definitions of your PowerSync schema.
72
+
The `DrizzleAppSchema` constructor simplifies the process of integrating Drizzle with PowerSync. It infers the local [PowerSync schema](https://docs.powersync.com/installation/client-side-setup/define-your-schema) from your Drizzle schema definition, providing a unified development experience.
73
+
74
+
As the PowerSync schema only supports SQLite types (`text`, `integer`, and `real`), the same limitation extends to the Drizzle table definitions.
75
+
76
+
To use it, define your Drizzle tables and supply the schema to the `DrizzleAppSchema` function:
For more information on how to use Drizzle queries in PowerSync, see [here](https://docs.powersync.com/client-sdk-references/javascript-web/javascript-orm/drizzle#usage-examples).
154
+
155
+
## Known limitations
156
+
157
+
- The integration does not currently support nested transactions (also known as `savepoints`).
0 commit comments