DbsStrategy

dbs_classes.DbsStrategy(self, database: IDatabase)

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.DbsStrategy.check_higher_level_usage(name: str)

Check if a strategy is used in a scenario.

Parameters

name : str

name of the strategy to be checked

Returns

: list[str]

list of scenarios that use the strategy

save

dbs_classes.DbsStrategy.save(object_model: Strategy, overwrite: bool = False)

Save an object in the database and all associated files.

This saves the toml file and any additional files attached to the object.

Parameters

object_model : Object

object to be saved in the database

overwrite : bool = False

whether to overwrite the object if it already exists in the database, by default False

Raises

: ValueError

Raise error if name is already in use.

Back to top