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
One thing I frequently want/need to do is truncate a test database. Generally this is something along the lines of
BEGINSET CONSTRAINTS ALL DEFERRED
DELETEFROM<>;
DELETEFROM<>;
COMMIT;
It would be nice to be able to get a list of tables out in order to run this query.
(My initial thought was sqlc should build a dependency graph to delete the tables in the right order and then realized we don't need to do that because you can defer constraint enforcement to the end.)
The text was updated successfully, but these errors were encountered:
Ahhh, right, I do need the dependency graph because foreign keys are not deferrable by default so I need to go back and make them all deferrable or delete the tables in the "correct" order which in theory sqlc could infer.
One thing I frequently want/need to do is truncate a test database. Generally this is something along the lines of
It would be nice to be able to get a list of tables out in order to run this query.
(My initial thought was sqlc should build a dependency graph to delete the tables in the right order and then realized we don't need to do that because you can defer constraint enforcement to the end.)
The text was updated successfully, but these errors were encountered: