BaseField
class¶
saffier.core.db.fields.base.Field
¶
Field(*, primary_key=False, index=False, unique=False, **kwargs)
Base field for the model declaration fields.
PARAMETER | DESCRIPTION |
---|---|
primary_key |
TYPE:
|
index |
TYPE:
|
unique |
TYPE:
|
**kwargs |
TYPE:
|
Source code in saffier/core/db/fields/base.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
get_column
¶
get_column(name)
Returns a column type for the model field.
PARAMETER | DESCRIPTION |
---|---|
name |
TYPE:
|
Source code in saffier/core/db/fields/base.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
get_validator
¶
get_validator(**kwargs)
PARAMETER | DESCRIPTION |
---|---|
**kwargs |
TYPE:
|
Source code in saffier/core/db/fields/base.py
88 89 |
|
get_column_type
¶
get_column_type()
Source code in saffier/core/db/fields/base.py
91 92 |
|
get_constraints
¶
get_constraints()
Source code in saffier/core/db/fields/base.py
94 95 |
|
expand_relationship
¶
expand_relationship(value)
PARAMETER | DESCRIPTION |
---|---|
value |
TYPE:
|
Source code in saffier/core/db/fields/base.py
97 98 |
|
raise_for_non_default
¶
raise_for_non_default(default, server_default)
PARAMETER | DESCRIPTION |
---|---|
default |
TYPE:
|
server_default |
TYPE:
|
Source code in saffier/core/db/fields/base.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|