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.

Query​

Query(self,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>,
*,
identifier: str = '',
parts: None = <factory>,
table: str) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
tableThe table to use.
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.

Model​

Model(self,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: None = <factory>,
*,
identifier: str = '',
parts: None = <factory>,
table: str) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
tableThe table to use.
partsThe parts of the query.

A model helper class for create a query to predict.