Field used as key for delete and update functions. For composite keys use multiple times.
skip_inup
No insert, update for this field.
Use for auto increment columns or columns calculated from database triggers.
sql
Maps field to SQL expression instead of table column. To insert the table alias use two dots. Skipped for insert, update.
sql ="SELECT COUNT (*) FROM Message m WHERE m.user_id = ..id"
sql_join
Loads a single struct with an sql join, where self and other defines columns with same values. For composite keys use multiple sql_join.
sql_join( self="friend_id", other="friend.id", on="friend.best = true")If self is omitted it will be created from variable name.
merge
Loads a dependend Vec<>. Merges run an additional SELECT statemen. self and other define struct fields with same values. For composite fields use multiple merges
merge(self="id", other="user_id")
ignore_wildcard
No selection for ** and *
alias
Builds sql_join with this alias.
table
Joins or merges on this table.
role
Field only accessable for queries with this role. Multiple use requires multiple roles.