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
Loving how zapatos does things. One thing I'm missing is the ability to also generate code/data about the schema beyond types (but of course, typed using the generated schema.d.ts).
A simple example is wanting to have an array/set of the column names for a table, as we store deleted rows in a _deleted table alongside a table for record-keeping/debugging. We accomplish this with something akin to:
with deleted_data as (delete from foo returning a,b,c,d)
insert into foo_deleted (a,b,c,d) select a,b,c,d from deleted_data
Using * isn't an option here, as we cant guarantee the column order between the 2 tables is identical.
Even beyond column names, I can imagine (optionally?) generating other schema info that can be used at runtime would be useful as well.
The text was updated successfully, but these errors were encountered:
Sounds interesting. I guess this might be accomplished with some additional hooks that could be imported from zapatos/generate? Can you envisage how you'd like that to work in your case?
Loving how zapatos does things. One thing I'm missing is the ability to also generate code/data about the schema beyond types (but of course, typed using the generated schema.d.ts).
A simple example is wanting to have an array/set of the column names for a table, as we store deleted rows in a _deleted table alongside a table for record-keeping/debugging. We accomplish this with something akin to:
Using
*
isn't an option here, as we cant guarantee the column order between the 2 tables is identical.Even beyond column names, I can imagine (optionally?) generating other schema info that can be used at runtime would be useful as well.
The text was updated successfully, but these errors were encountered: