-
Notifications
You must be signed in to change notification settings - Fork 3
Basic Syntax
At a minimum, a template must consist of the following elements.
This is called a block.
The entire document is case insensitive.
Comments can be used in the file by starting a line with the hash (#) character.
Table must be the first keyword in each block.
Table expects a single parameter, the name of the table that the data will be pushed to.
The parser will validate that the parameter exists.
Key always follows Table. When creating the sql code the key is used to determine if a row should be created, updated or deleted.
Key expects at least one parameter
To provide multiple key values, separate each one with a space.
The parser checks that each key is unique.
Data is just a placeholder keyword that lets the parser know that the next row contains the column names.
There are no parameters for this keyword.
On the next line a list of the columns used by the sql statement and to create the enum. Each column is separated by the pipe character (|).
Names must be unique.
At this stage the parser will check to see if the parameters following 'Key' exist in the column list.
After the column values comes the data.
Each time the pipe character is pressed the table will realign the data to ensure it stays readable.
If there are lots of rows of data then the column headers may not be visible, making it difficult to know what each column represents.
The column headers can be added again to make reading easier.
This can also be used to group related data. In the next example, by CategoryID.
To use the pipe ('|') character as part of the data instead of a separator, use \|
To add related data to several tables, create many blocks in the same file.