Skip to main content

query

superduper.backends.mongodb.query

Source code

DeleteOne​

DeleteOne(**kwargs)
ParameterDescription
kwargsThe arguments to pass to the operation.

DeleteOne operation for MongoDB.

InsertOne​

InsertOne(**kwargs)
ParameterDescription
kwargsThe arguments to pass to the operation.

InsertOne operation for MongoDB.

ReplaceOne​

ReplaceOne(**kwargs)
ParameterDescription
kwargsThe arguments to pass to the operation.

ReplaceOne operation for MongoDB.

UpdateOne​

UpdateOne(**kwargs)
ParameterDescription
kwargsThe arguments to pass to the operation.

UpdateOne operation for MongoDB.

parse_query​

parse_query(query,
documents: Sequence[Dict] = (),
db: Optional[ForwardRef('Datalayer')] = None)
ParameterDescription
queryThe query to parse.
documentsThe documents to query.
dbThe datalayer to use to execute the query.

Parse a string query into a query object.

MongoQuery​

MongoQuery(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 class for MongoDB.

This class is used to build and execute queries on a MongoDB database.

BulkOp​

BulkOp(self,
identifier: str,
db: dataclasses.InitVar[typing.Optional[ForwardRef('Datalayer')]] = None,
uuid: str = None,
*,
kwargs: Dict = None) -> None
ParameterDescription
identifierIdentifier of the leaf.
dbDatalayer instance.
uuidUUID of the leaf.
kwargsThe arguments to pass to the operation.

A bulk operation for MongoDB.

ChangeStream​

ChangeStream(self,
collection: str,
args: Sequence = None,
kwargs: Dict = None) -> None
ParameterDescription
collectionThe collection to perform the query on
argsPositional query arguments to pymongo.Collection.watch
kwargsNamed query arguments to pymongo.Collection.watch

Change stream class to watch for changes in specified collection.