ResourceModel class.
data: Dict[str, Any]
flagged: bool
folder: SpaceFolder
fs_node_model: FSNodeModel
generated_by_port_name: str
id: str
name: str
origin: ResourceOrigin
parent_resource_id: str
scenario: Scenario
style: TypingStyle
task_model: TaskModel
Initialize self. See help(type(self)) for accurate signature.
bool
- True
bool
- False
bool
dict
Type[Resource]
str
EntityType
Optional[KVStore]
Returns the resource created from the data and resource_typing_name if new_instance, it forces to rebuild the resource
bool
- False
Resource
Optional[Type[Resource]]
TechnicalInfoDict
FSNode
FSNode
bool
Returns True if the model is saved in db, False otherwise
bool
for each BaseRField of the resource, store its value to the data or kvstore
Resource
ModelType
Remove the kv store if it exists
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
ModelType
str
'ResourceModel'
str
ResourceModelDTO
ResourceSimpleDTO
Any
Create the foreign keys because it was deffered
Method call after the table is created
Usefull to create the full text indexes
Any
Any
bool
- True
bool
- True
Any
Any
bool
- True
bool
- True
Any
Any
Any
Any
Any
Returns the name of the class
bool
- False
bool
- False
bool
- False
str
Clear folders from all the entities that have the folder
List
Returns True if the column exists in the table
str
bool
Any
Create a foreign key for a Foreign key field only if the foreign key does not exists
ForeignKeyField
Method to create a full text index
List
str
Create model table
Any
str
ModelDelete
List[ResourceModel]
str
Drop model table
Execute a raw SQL query. Can use the [TABLE_NAME] to replace by the table name
str
Any
Any
str
Optional['ResourceModel']
str
bool
Create a new ResourceModel from a resource
Don't set the resource here so it is regenerate on next get ( avoid using same instance)
Resource
ResourceOrigin
- ResourceOrigin.GENERATED
Optional[Scenario]
Optional[TaskModel]
str
bool
ResourceModel
Returns the full name of the class
bool
- False
bool
- False
str
Any
Any
str
Optional
Get by ID and throw 404 error if object not found
str
ModelType
List
List
str
ModelSelect
List[str]
ModelSelect
str
ModelSelect
List[str]
ModelSelect
List[str]
ModelSelect
Return the expression to search resource base on a type and all its subtypes.
If the Resource type is provided, it returns None
List[str]
Expression
DatabaseProxy
Returns the (current) DbManager of this model
Type
Any
Any
str
bool
ModelSelect
Returns the table name of this class
str
Any
Returns True if the index exists in the table
str
bool
Get all the classes that inherit this class
List
Any
Any
Any
Any
Any
Any
Any
Any
Any
Any
Any
Any
Create the ResourceModel from the Resource and save it
Resource
ResourceOrigin
- ResourceOrigin.GENERATED
Scenario
TaskModel
str
bool
ResourceModel
Performs full-text search on the field. Must be overrided by child class to work
str
str
ModelSelect
Any
str
ModelSelect
select resource by type of any subclass of this type
Type[Resource]
ModelSelect
Any
Any
Any
Any
Any
Any