Struct Attributes

AttributeDescriptionTypeOptional
rename_allRenames all the struct's fields according to the given case convention. The possible values are "lowercase", "UPPERCASE", "PascalCase", "camelCase", "snake_case", "SCREAMING_SNAKE_CASE".stringY
tableExplicitly define the table name. By default, it must correspond with the struct name in snake_case. Use relax_table if you want to opt out of this but not encouraged.OptionY
relax_tableDetermines whether the struct's name is matched to the table name as the snake case by default. This is not encouraged. Using your struct 1:1 to your database tables helps to ensure uniquness and prevent confusion.OptionY
schemafullMake the table enforce a schema struct.OptionY
dropDrop the table if it exists and create a new one with the same name.OptionY
asInline statement e.g select(All).from(user) for creating a projection using the DEFINE TABLE statement. This is useful for copying data from an existing table in the new table definition. This is similar to making a view in a RDBMS.A select statementY
as_fnSame as above as but defined as external function from the struct e.g select_reading_from_user for creating a projection using the DEFINE TABLE statement. This is useful for copying data from an existing table in the new table definition. This is similar to making a view in a RDBMS.A function nameY
permissionsSpecify permissions that apply to the table using the for statement.ForStatementY
permissions_fnSame as permission but as an external function from the struct. Specify permissions that apply to the table using the for statement.ForStatementY
defineGenerates a DEFINE TABLE statement for the table. This overrides other specific definitions to prevent confusion and collision. You can also invoke an external function directly rather than inlining the function e.g define = "define_student()"inline code stringY
define_fnGenerates a DEFINE TABLE statement for the table. This overrides other specific definitions to prevent confusion and collision. Same as define attribute but expects the function name instead rather than invocation i.e define_student instead of define_student(). You can also invoke an external function directly rather than inlining the function e.g `define = "def