-
Notifications
You must be signed in to change notification settings - Fork 2
Code template instruction
chen edited this page Feb 18, 2023
·
4 revisions
DbToys use scriban as text template.
- See the Language document for a description of the language syntax.
- See the Built-in functions document for the list of the built-in functions.
- See the Sample templates for your reference.
Also, there's some extra customized string functions:
- string.to_camal_case
- string.to_pascal_case
- string.to_snake_case
- string.to_singular
- string.to_plural
- string.to_kebab_case
The global templates will be appended to the start of the other templates.
The output filename must defined in the template file.
{{~ filename = (table.clean_name | string.to_pascal_case | string.to_plural) + ".cs" ~}}