DrizzleAppSchema
constructor simplifies the process of integrating Drizzle with PowerSync. It infers the local PowerSync schema from your Drizzle schema definition, providing a unified development experience.
As the PowerSync schema only supports SQLite types (text
, integer
, and real
), the same limitation extends to the Drizzle table definitions.
To use it, define your Drizzle tables and supply the schema to the DrizzleAppSchema
function:
toPowerSyncTable
.
toCompilableQuery
.
watch()
function from the Drizzle integration which takes in a Drizzle query.