Skip to content

Basic Syntax

Danny Quinn edited this page Sep 29, 2018 · 6 revisions

At a minimum, a template must consist of the following elements.

Detail Block1

This is called a block.

The entire document is case insensitive.

Comments

Comments can be used in the file by starting a line with the hash (#) character.

Detail Comment

Table

Table must be the first keyword in each block.

Detail Table1

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.

Detail Table2

Key

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

Details Key1

To provide multiple key values, separate each one with a space.

Detail Key2

The parser checks that each key is unique.

Detail Key3

Data

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.

Detail Data

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 (|).

Details Column1

Names must be unique.

At this stage the parser will check to see if the parameters following 'Key' exist in the column list.

Details Column2

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.

Details Column3

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.

Details Column4

The column headers can be added again to make reading easier.

Details Column5

This can also be used to group related data. In the next example, by CategoryID.

Details Column6

To use the pipe ('|') character as part of the data instead of a separator, use \|

Details Column7

To add related data to several tables, create many blocks in the same file.

Details Column8

Clone this wiki locally