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
We need a way to generate sql CREATE TABLE statements based on the JSONSchema definitions (only top-level properties - nested props to be stored as JSON in SQLite).
We can generate SQL statements ourselves from JSON Schema to generate extraColumns, or we can use a helper like Drizzle-kit, which also gives us added benefits of typed sql select statements. Drizzle provides a nice API for this. I think it will be easier to map our JSOn schema to the drizzle table schema API than it would be to generate CREATE TABLE SQL statements manually from JSON Schema.
This will also give us typed db.select() functions for our datatype API, which will give a bit more typesafety for that part of the code.
The text was updated successfully, but these errors were encountered:
gmaclennan
changed the title
Use drizzle-orm for SQLite table schemas and read queries
Create sqlite index tables from JSONSchema definitions in @mapeo/schema
Jul 26, 2023
We need a way to generate sql
CREATE TABLE
statements based on the JSONSchema definitions (only top-level properties - nested props to be stored as JSON in SQLite).We can generate SQL statements ourselves from JSON Schema to generate
extraColumns
, or we can use a helper like Drizzle-kit, which also gives us added benefits of typed sql select statements. Drizzle provides a nice API for this. I think it will be easier to map our JSOn schema to the drizzle table schema API than it would be to generate CREATE TABLE SQL statements manually from JSON Schema.See #135
This will also give us typed
db.select()
functions for our datatype API, which will give a bit more typesafety for that part of the code.The text was updated successfully, but these errors were encountered: