There are some restrictions on what counts as a
.sql file for
In order to correctly guess which type (reading/writing/calling) your statement is,
YoSQL does not parse your SQL code, but uses the file name of your
.sql files or the
name front matter. It applies the following rules to determine the type of a statement from its name:
- All names that start with the configured read prefixes are assigned the
- All names that start with the configured write prefixes are assigned the
- All names that start with the configured call prefixes are assigned the
- All other statements are assigned the
UNKNOWNtype. Statements of this type are ignored while generating code.
You can always overwrite that guess with a specific
type value in your front matter. This can be useful if you want to use a special name for your statement, but don’t want to adhere to the configured prefixes. On the other hand, enable validateMethodNamePrefixes to enforce that all statements are named accordingly to the configured prefixes.
YoSQL only considers files that end in
.sql, but this can be configured using the sqlFilesSuffix option.
YoSQL uses the UTF-8 charset. In order to change this, use the sqlFilesCharset option.
; to separate multiple SQL statements within a single file. In order to change this, use the sqlStatementSeparator option.
In case your
.sql files contain a license header, use the skipLines option to skip those initial lines. Otherwise
YoSQL will consider those lines to be part of the first statement in your