qunicorn_core.db.database_services package
Submodules
qunicorn_core.db.database_services.db_service module
- qunicorn_core.db.database_services.db_service.get_all_database_objects(database_object_class: Type[DbModel]) DbModelTypes
Gets all database objects of a table
- Arguments:
database_object_class - class of the database objects
- qunicorn_core.db.database_services.db_service.get_database_object_by_id(db_object_id: int, database_object_class: Type[DbModel]) DbModelType
Gets a database object
- Arguments:
db_object_id - id of the database object database_object_class - class of the database object
- qunicorn_core.db.database_services.db_service.get_session()
qunicorn_core.db.database_services.device_db_service module
- qunicorn_core.db.database_services.device_db_service.get_all_devices() list[DeviceDataclass]
Gets all Devices from the DB
- qunicorn_core.db.database_services.device_db_service.get_device_by_id(device_id: int) DeviceDataclass
Get a device by id
- qunicorn_core.db.database_services.device_db_service.get_device_with_name(device_name: str) DeviceDataclass
Returns the default device of the provider with the name provider_name
- qunicorn_core.db.database_services.device_db_service.save_device_by_name(device: DeviceDataclass)
Updates device object in database if it exists and creates new entry if it doesn’t exist
qunicorn_core.db.database_services.job_db_service module
- qunicorn_core.db.database_services.job_db_service.create_database_job(job_core: JobCoreDto)
Creates a database job with the given circuit and saves it in the database
- qunicorn_core.db.database_services.job_db_service.delete_jobs_by_deployment_id(deployment_id: int) list[JobDataclass]
Gets the job with the deployment_id from the database
- qunicorn_core.db.database_services.job_db_service.get_all() list[JobDataclass]
Gets all Jobs from the database
- qunicorn_core.db.database_services.job_db_service.get_job_by_id(job_id: int) JobDataclass
Gets the job with the job_id from the database
- qunicorn_core.db.database_services.job_db_service.get_jobs_by_deployment_id(deployment_id: int) list[JobDataclass]
Gets the job with the deployment_id from the database
- qunicorn_core.db.database_services.job_db_service.update_attribute(job_id: int, attribute_value, attribute_name)
Updates one attribute (attribute_name) of the job with the id job_id
- qunicorn_core.db.database_services.job_db_service.update_finished_job(job_id: int, results: list[ResultDataclass], job_state: JobState = JobState.FINISHED)
Updates the attributes state and results of the job with the id job_id