maestral.database.query¶
SQL query definitions that facilitate writing object-oriented code to generate SQL queries.
Module Contents¶
- class maestral.database.query.Query[source]¶
Base type for query
- class maestral.database.query.PathTreeQuery(column, path)[source]¶
Bases:
Query
Query for an entire subtree at the given path.
- Parameters:
column (maestral.database.orm.Column[Any, Any]) – Column to match.
path (str) – Root path for the subtree.
- class maestral.database.query.MatchQuery(column, value)[source]¶
Bases:
Query
Query to match an exact value.
- Parameters:
column (maestral.database.orm.Column[Any, Any]) – Column to match.
value (Any) – Value to match.
- class maestral.database.query.CollectionQuery(*subqueries)[source]¶
Bases:
Query
An abstract query class that aggregates other queries. Can be indexed like a list to access the sub-queries.
- Parameters:
subqueries (Query) – Subqueries to aggregate.
- class maestral.database.query.AndQuery(*subqueries)[source]¶
Bases:
CollectionQuery
A conjunction of a list of other queries.
- Parameters:
subqueries (Query)
- class maestral.database.query.OrQuery(*subqueries)[source]¶
Bases:
CollectionQuery
A conjunction of a list of other queries.
- Parameters:
subqueries (Query)