Field declarations for models
Bases: flywheel.fields.Field
A field that is composed of multiple other fields
Parameters: | *fields : list
hash_key : bool, optional
range_key : bool, optional
index : str, optional
data_type : str, optional
coerce : bool, optional
check : callable, optional
merge : callable, optional
|
---|
Bases: object
Declarative way to specify model fields
Parameters: | hash_key : bool, optional
range_key : bool, optional
index : str, optional
data_type : object, optional
coerce : bool, optional
check : callable, optional
default : object, optional
|
---|
Notes
Field(index='my-index')
Is shorthand for:
Field().all_index('my-index')
Attributes
name | str | The name of the attribute on the model |
model | class | The Model this field is attached to |
composite | bool | True if this is a composite field |
Index this field and project all attributes
Parameters: | name : str
|
---|
Create a query condition that this field must be between two values (inclusive)
Poetic version of between_()
Check if the provided fields are enough to fully resolve this field
Parameters: | fields : list or set |
---|---|
Returns: | needed : set
|
Index this field and project selected attributes
Parameters: | name : str
includes : list, optional
|
---|