dbs_classes.dbs_strategy.DbsStrategy
self, database) dbs_classes.dbs_strategy.DbsStrategy(
Methods
Name | Description |
---|---|
check_higher_level_usage | Check if a strategy is used in a scenario. |
save | Save an object in the database and all associated files. |
check_higher_level_usage
dbs_classes.dbs_strategy.DbsStrategy.check_higher_level_usage(name)
Check if a strategy is used in a scenario.
Parameters
Name | Type | Description | Default |
---|---|---|---|
name | str | name of the strategy to be checked | required |
Returns
Name | Type | Description |
---|---|---|
list[str] | list of scenarios that use the strategy |
save
=False) dbs_classes.dbs_strategy.DbsStrategy.save(object_model, overwrite
Save an object in the database and all associated files.
This saves the toml file and any additional files attached to the object.
Parameters
Name | Type | Description | Default |
---|---|---|---|
object_model | ObjectModel | object to be saved in the database | required |
overwrite | bool | whether to overwrite the object if it already exists in the database, by default False | False |
Raises
Name | Type | Description |
---|---|---|
ValueError | Raise error if name is already in use. |