Skip to main content

query

superduper.backends.base.query

Source code

applies_to​

applies_to(*flavours)
ParameterDescription
flavoursThe flavours to check against.

Decorator to check if the query matches the accepted flavours.

parse_query​

parse_query(query: Union[str,
list],
builder_cls: Optional[Type[superduper.backends.base.query.Query]] = None,
documents: Sequence[Any] = (),
db: Optional[ForwardRef('Datalayer')] = None)
ParameterDescription
queryThe query to parse.
builder_clsThe class to use to build the query.
documentsThe documents to query.
dbThe datalayer to use to execute the query.

Parse a string query into a query object.

Model​

Model(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: str = None,
parts: Sequence[Union[Tuple,
str]] = ()) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
partsThe parts of the query.

A model helper class for create a query to predict.

Query​

Query(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: str = None,
*,
parts: Sequence[Union[Tuple,
str]] = ()) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
partsThe parts of the query.

A query object.

This base class is used to create a query object that can be executed in the datalayer.

TraceMixin​

TraceMixin(self,
/,
*args,
**kwargs)

Mixin to add trace functionality to a query.