spinedb_api.db_mapping_query_mixin
Module Contents
Classes
Provides the |
- class spinedb_api.db_mapping_query_mixin.DatabaseMappingQueryMixin(*args, **kwargs)[source]
Provides the
query()method for performing customSELECTqueries.- property superclass_subclass_sq[source]
A subquery of the form:
SELECT * FROM superclass_subclass
- Returns
- property entity_class_dimension_sq[source]
A subquery of the form:
SELECT * FROM entity_class_dimension
- Returns
- property wide_entity_class_sq[source]
A subquery of the form:
SELECT ec.*, count(ecd.dimension_id) AS dimension_count group_concat(ecd.dimension_id) AS dimension_id_list FROM entity_class AS ec entity_class_dimension AS ecd WHERE ec.id == ecd.entity_class_id
- Returns
- property wide_entity_sq[source]
A subquery of the form:
SELECT e.*, count(ee.element_id) AS element_count group_concat(ee.element_id) AS element_id_list FROM entity AS e entity_element AS ee WHERE e.id == ee.entity_id
- Returns
- property scenario_alternative_sq[source]
A subquery of the form:
SELECT * FROM scenario_alternative
- Returns
- property entity_alternative_sq[source]
A subquery of the form:
SELECT * FROM entity_alternative
- Returns
- property parameter_value_list_sq[source]
A subquery of the form:
SELECT * FROM parameter_value_list
- Returns
- property parameter_definition_sq[source]
A subquery of the form:
SELECT * FROM parameter_definition
- Returns
- property parameter_value_metadata_sq[source]
A subquery of the form:
SELECT * FROM parameter_value_metadata
- Returns
- override_entity_class_sq_maker(method)[source]
Overrides the function that creates the
entity_class_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns entity class subquery as anAliasobject
- override_entity_sq_maker(method)[source]
Overrides the function that creates the
entity_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns entity subquery as anAliasobject
- override_entity_element_sq_maker(method)[source]
Overrides the function that creates the
entity_element_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns entity_element subquery as anAliasobject
- override_parameter_definition_sq_maker(method)[source]
Overrides the function that creates the
parameter_definition_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns parameter definition subquery as anAliasobject
- override_parameter_value_sq_maker(method)[source]
Overrides the function that creates the
parameter_value_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns parameter value subquery as anAliasobject
- override_alternative_sq_maker(method)[source]
Overrides the function that creates the
alternative_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns alternative subquery as anAliasobject
- override_scenario_sq_maker(method)[source]
Overrides the function that creates the
scenario_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns scenario subquery as anAliasobject
- override_scenario_alternative_sq_maker(method)[source]
Overrides the function that creates the
scenario_alternative_sqproperty.- Parameters
method (Callable) – a function that accepts a
DatabaseMappingas its argument and returns scenario alternative subquery as anAliasobject
- restore_entity_class_sq_maker()[source]
Restores the original function that creates the
entity_class_sqproperty.
- restore_entity_sq_maker()[source]
Restores the original function that creates the
entity_sqproperty.
- restore_entity_element_sq_maker()[source]
Restores the original function that creates the
entity_element_sqproperty.
- restore_parameter_definition_sq_maker()[source]
Restores the original function that creates the
parameter_definition_sqproperty.
- restore_parameter_value_sq_maker()[source]
Restores the original function that creates the
parameter_value_sqproperty.
- restore_alternative_sq_maker()[source]
Restores the original function that creates the
alternative_sqproperty.