Coverage for src/fluree_py/types/query/query.py: 100%
13 statements
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-02 03:03 +0000
« prev ^ index » next coverage.py v7.8.0, created at 2025-04-02 03:03 +0000
1from typing import TypeAlias, TypedDict
3from fluree_py.types.common import Context
4from fluree_py.types.query.select import LogicVariable, SelectClause
5from fluree_py.types.query.where import WhereClause, WhereFilterExpression
6from fluree_py.types.common import TimeClause
10Role: TypeAlias = str
11DecentralizedIdentifier: TypeAlias = str
13ActiveIdentity = TypedDict(
14 "ActiveIdentity", {"did": DecentralizedIdentifier, "role": Role}, total=False
15)
17OrderByClause: TypeAlias = LogicVariable | list[LogicVariable]
19HavingClause: TypeAlias = WhereFilterExpression | list[WhereFilterExpression]
20GroupByClause: TypeAlias = LogicVariable | list[LogicVariable]
23QuerySchema = TypedDict(
24 "QuerySchema",
25 {
26 "@context": Context,
27 "from": str | list[str],
28 "where": WhereClause,
29 "select": SelectClause,
30 "t": TimeClause,
31 "groupBy": GroupByClause,
32 "having": HavingClause,
33 "orderBy": OrderByClause,
34 },
35)
36"""
37A schema for a FlureeQL query.
38"""