Skip to content

query ¤

Classes:

QueryBuilderImpl dataclass ¤

QueryBuilderImpl(
    *,
    endpoint: str,
    ledger: str,
    context: dict[str, Any] | None = None,
    where: WhereClause | None = None,
    group_by: GroupByClause | None = None,
    having: HavingClause | None = None,
    order_by: OrderByClause | None = None,
    opts: ActiveIdentity | None = None,
    select_fields: dict[str, Any] | list[str] | None = None,
)

Bases: WithContextMixin['QueryBuilderImpl'], WithWhereMixin['QueryBuilderImpl'], RequestMixin, CommitableMixin['QueryBuilderImpl'], QueryBuilder

Implementation of a query operation builder.

Methods:

acommit async ¤

acommit() -> FlureeResponse

Executes the transaction asynchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

build_request_payload ¤

build_request_payload() -> dict[str, Any]

Build the request payload for the query operation.

commit ¤

commit() -> FlureeResponse

Executes the transaction synchronously.

Raises:

  • RequestError

    If the HTTP request fails.

  • TypeError

    If the type parameter cannot be resolved.

get_url ¤

get_url() -> str

Get the endpoint URL for the query operation.

with_group_by ¤

with_group_by(fields: GroupByClause) -> Self

Add group by clause to the query.

with_having ¤

with_having(condition: HavingClause) -> Self

Add having clause to the query.

with_opts ¤

with_opts(opts: ActiveIdentity) -> Self

Add query options to the query.

with_order_by ¤

with_order_by(fields: OrderByClause) -> Self

Add order by clause to the query.

with_select ¤

with_select(fields: SelectObject | SelectArray) -> Self

Add select fields to the query.