Decorators
Drizzle
@config
config - Mark this property as a configuration.
@Drizzle.config(config: valueof Drizzle.Configuration)
Target
Namespace
Parameters
| Name | Type | Description |
|---|---|---|
| config | valueof model Drizzle.Configuration |
@default
default - Mark this property as a default value.
@Drizzle.default(type?: valueof string | int32 | int16 | int8 | uint32 | uint16 | uint8 | float32 | float64 | boolean)
Target
ModelProperty
Parameters
| Name | Type | Description |
|---|---|---|
| type | valueof union string | int32 | int16 | int8 | uint32 | uint16 | uint8 | float32 | float64 | boolean |
@id
id - Mark this property as the primary key, or the list of columns that make up the primary key.
@Drizzle.id(name?: valueof string, fields?: valueof string[])
Target
union ModelProperty | Model
Parameters
| Name | Type | Description |
|---|---|---|
| name | valueof scalar string | The alternate name. |
| fields | valueof model string[] | The list of columns that make up the primary key. |
@index
index - Mark this property as an index.
@Drizzle.index(name?: valueof string, sql?: valueof string)
Target
ModelProperty
Parameters
| Name | Type | Description |
|---|---|---|
| name | valueof scalar string | The alternate name. |
| sql | valueof scalar string | The SQL statement to use for the index. It will replace {column} with the name of the current column. so you can use {column} in the SQL statement. Think lower(\{column\}) to lower case the index. If \ |
@map
map - Mark this property as a column in a table.
@Drizzle.map(column: valueof string)
Target
ModelProperty
Parameters
| Name | Type | Description |
|---|---|---|
| column | valueof scalar string |
@relation
relation - Mark this property as a relation.
@Drizzle.relation(relation?: valueof Drizzle.RelationOptions)
Target
ModelProperty
Parameters
| Name | Type | Description |
|---|---|---|
| relation | valueof model Drizzle.RelationOptions |