npm install @skibididrizz/drizzle
config - Mark this property as a configuration.
@Drizzle.config(config: valueof Drizzle.Configuration)
Namespace
Name | Type | Description |
---|---|---|
config | valueof model Drizzle.Configuration |
default - Mark this property as a default value.
@Drizzle.default(type?: valueof string | int32 | int16 | int8 | uint32 | uint16 | uint8 | float32 | float64 | boolean)
ModelProperty
Name | Type | Description |
---|---|---|
type | valueof union string | int32 | int16 | int8 | uint32 | uint16 | uint8 | float32 | float64 | boolean |
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[])
union ModelProperty | Model
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 - Mark this property as an index.
@Drizzle.index(name?: valueof string, sql?: valueof string)
ModelProperty
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 - Mark this property as a column in a table.
@Drizzle.map(column: valueof string)
ModelProperty
Name | Type | Description |
---|---|---|
column | valueof scalar string |
relation - Mark this property as a relation.
@Drizzle.relation(relation?: valueof Drizzle.RelationOptions)
ModelProperty
Name | Type | Description |
---|---|---|
relation | valueof model Drizzle.RelationOptions |
sql - Mark this property as the value of a SQL statement.
@Drizzle.sql(statement: valueof string)
ModelProperty
Name | Type | Description |
---|---|---|
statement | valueof scalar string |
table - Mark this model as a table, optionally with a name.
@Drizzle.table(tableName?: valueof string)
union Model | Enum
Name | Type | Description |
---|---|---|
tableName | valueof scalar string |
unique - Mark this property as a unique value.
@Drizzle.unique(...columns: valueof string[])
union ModelProperty | Model
Name | Type | Description |
---|---|---|
columns | valueof model string[] |
uuid - Mark this property as a UUID.
@Drizzle.uuid(defaultRandom?: boolean)
ModelProperty
Name | Type | Description |
---|---|---|
defaultRandom | scalar boolean |