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
I want to be able to require a file once. The aim is to be able to require a dependency, only the first call to require a file will actually insert the file in the SQL the rest will be a null operation.
The suggested syntax is {#./file/path.sql} where the conditions are
Must be at the top of a file before any SQL (defined as non-whitespace)
Must not be required by any other file
The use case is for easily building schemas (especially for tests)
For example given
/* filepath: ./users.sql */CREATETABLEusers (
id INTEGER,
username varchar(30),
role varchar(30),
status varchar(30)
);
You could add ./users.sql as a dependency of ./friends.sql
I want to be able to require a file once. The aim is to be able to require a dependency, only the first call to require a file will actually insert the file in the SQL the rest will be a null operation.
The suggested syntax is
{#./file/path.sql}
where the conditions areThe use case is for easily building schemas (especially for tests)
For example given
You could add
./users.sql
as a dependency of./friends.sql
However you could also include it in another schema
The advantage in this approach is
The text was updated successfully, but these errors were encountered: