Typing
Typing class. This class allows storing information on all the types of the models in the system.
:property type: The type of the related model.
:type type: str
:property super_type: The super type of the related model.
:type super_type: str
:property root_type: The root type of the related task.
:type root_type: str
Attributes
brick: CharField
brick_version: CharField
data: Dict
deprecated_message: CharField
deprecated_since: CharField
hide: BooleanField
human_name: CharField
model_type: CharField
object_sub_type: CharField
object_type: CharField
related_model_typing_name: CharField
short_description: CharField
style: TypingStyle
unique_name: CharField
Functions
Initialize self. See help(type(self)) for accurate signature.
Name | Type | Default value | Description |
---|---|---|---|
_coerce | bool | True |
Name | Type | Default value | Description |
---|---|---|---|
recursive | bool | False | |
delete_nullable | bool | False |
Name | Type | Default value | Description |
---|---|---|---|
search_nullable | bool | False |
List |
Return the python documentation of the model type
str |
Optional |
Optional |
TypingStatus |
Returns True if the model is saved in db, False otherwise
bool |
ModelType |
Sets the data
set force_insert to True to force creation of the object
set skip_hook to True to skip the before insert or update hook
:raises Exception: If the input data is not a dict
ModelType |
TypingDTO |
TypingFullDTO |
TypingRefDTO |
SimpleTypingDTO |
Name | Type | Default value | Description |
---|---|---|---|
fields | Any |
Method call after all the table are inited
Useful when use DeferredForeignKey to create the foreign key manually latter
Method call after the table is created
Usefull to create the full text indexes
Name | Type | Default value | Description |
---|---|---|---|
alias | Any |
Name | Type | Default value | Description |
---|---|---|---|
database | Any | ||
bind_refs | bool | True | |
bind_backrefs | bool | True | |
_exclude | Any |
Name | Type | Default value | Description |
---|---|---|---|
database | Any | ||
bind_refs | bool | True | |
bind_backrefs | bool | True |
Name | Type | Default value | Description |
---|---|---|---|
model_list | Any | ||
batch_size | Any |
Name | Type | Default value | Description |
---|---|---|---|
model_list | Any | ||
fields | Any | ||
batch_size | Any |
Returns the name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | True to slugify the class name if true, defaults to false , optional |
snakefy | bool | False | True to snakefy the class name if true, defaults to false , optional |
replace_uppercase | bool | False | Replace upper cases by "-" if true, defaults to false , optional |
str |
Returns True if the column exists in the table
Name | Type | Default value | Description |
---|---|---|---|
column_name | str | The column name `` |
bool |
Name | Type | Default value | Description |
---|---|---|---|
query | Any |
Create a foreign key for a Foreign key field only if the foreign key does not exists
Name | Type | Default value | Description |
---|---|---|---|
field | ForeignKeyField | [description] |
Method to create a full text index
Name | Type | Default value | Description |
---|---|---|---|
columns | List | [description] [str] | |
index_name | str |
Create model table
Name | Type | Default value | Description |
---|---|---|---|
decorator_name | Any |
Name | Type | Default value | Description |
---|---|---|---|
pk | Any |
Drop model table
Name | Type | Default value | Description |
---|---|---|---|
dq_nodes | Any | ||
filters | Any |
Name | Type | Default value | Description |
---|---|---|---|
column_name | str |
bool |
Returns the full name of the class
Name | Type | Default value | Description |
---|---|---|---|
slugify | bool | False | Slugify the returned class name if true, defaults to false , optional |
snakefy | bool | False | Snakefy the returned class name if true, defaults to false `` |
str |
Name | Type | Default value | Description |
---|---|---|---|
query | Any | ||
filters | Any |
Name | Type | Default value | Description |
---|---|---|---|
brick_name | str |
List |
Name | Type | Default value | Description |
---|---|---|---|
object_type | Literal | ||
brick | str | ||
unique_name | str |
ModelSelect |
Name | Type | Default value | Description |
---|---|---|---|
id | str |
Optional |
Get by ID and throw 404 error if object not found
Name | Type | Default value | Description |
---|---|---|---|
id | str | [description] |
ModelType |
Name | Type | Default value | Description |
---|---|---|---|
ids | List |
List |
Name | Type | Default value | Description |
---|---|---|---|
model_type | Type |
Typing |
Name | Type | Default value | Description |
---|---|---|---|
sub_type | str |
List |
Return all the visible typing name of a type.
Name | Type | Default value | Description |
---|---|---|---|
object_type | Literal |
ModelSelect |
Return all the visible typing name of a type searched by name.
Name | Type | Default value | Description |
---|---|---|---|
object_type | Literal | ||
name | str |
ModelSelect |
Return all the visible typing name of a type.
Name | Type | Default value | Description |
---|---|---|---|
object_type | Literal | ||
brick_name | str |
ModelSelect |
Name | Type | Default value | Description |
---|---|---|---|
typing_name | str |
Typing |
Retunr the list of typings that are a child class of the provided model_type
Name | Type | Default value | Description |
---|---|---|---|
typing_type | Literal | ||
base_type | Type |
List |
DatabaseProxy |
Returns the (current) DbManager of this model
Type |
Name | Type | Default value | Description |
---|---|---|---|
query | Any | ||
filters | Any |
Returns the table name of this class
str |
Name | Type | Default value | Description |
---|---|---|---|
fields | Any |
Returns True if the index exists in the table
Name | Type | Default value | Description |
---|---|---|---|
index_name | str | The index name `` |
bool |
Get all the classes that inherit this class
List |
Name | Type | Default value | Description |
---|---|---|---|
_Model__data | Any | ||
insert | Any |
Name | Type | Default value | Description |
---|---|---|---|
query | Any | ||
fields | Any |
Name | Type | Default value | Description |
---|---|---|---|
rows | Any | ||
fields | Any |
Returns the list of the methods
List |
Returns the module name of the class
str |
Retrieves the property names
Name | Type | Default value | Description |
---|---|---|---|
instance | type | The s of the properties to retrieve. set `none` to retrieve all. `type` or `union[type]` | |
exclude | type |
List |
Name | Type | Default value | Description |
---|---|---|---|
sql | Any | ||
params | Any |
Name | Type | Default value | Description |
---|---|---|---|
_Model__data | Any | ||
insert | Any |
Name | Type | Default value | Description |
---|---|---|---|
rows | Any | ||
fields | Any |
Performs full-text search on the field. Must be overrided by child class to work
Name | Type | Default value | Description |
---|---|---|---|
phrase | str | The phrase to search `` | |
modifier | str |
ModelSelect |
Name | Type | Default value | Description |
---|---|---|---|
fields | Any |
Name | Type | Default value | Description |
---|---|---|---|
key | Any | ||
value | Any |
Name | Type | Default value | Description |
---|---|---|---|
options | Any |
Name | Type | Default value | Description |
---|---|---|---|
model_type | Type |
bool |
Name | Type | Default value | Description |
---|---|---|---|
_Model__data | Any | ||
update | Any |
Name | Type | Default value | Description |
---|---|---|---|
method | Any |
Name | Type | Default value | Description |
---|---|---|---|
typing_name | str |
bool |