./models
directory of the project.
.sql
extension. The file should contain a SQL query
config
directive
config
directive should be in a comment block to be ignored by the SQL parser.
The model must define datasource
, which is the connection string to the database. Also, the model have two optional
parameters name
and id
. Default values for these parameters is the file name without the extension.
.yaml
or .ym;
extension:
datasource
and query
. name
and id
are optional parameters.
datasource
should be a connection string: postgres://user:password@host:port/dbname