Skip to content

Commit

Permalink
explicit projection when reading from Astra DB (#733)
Browse files Browse the repository at this point in the history
  • Loading branch information
hemidactylus authored May 15, 2024
1 parent 6f298ce commit c4f1cc4
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ def find_documents(self, find_query):
filter=find_query.get("filter"),
sort=find_query.get("sort"),
options=find_query.get("options"),
projection={"*": 1},
)

if "data" in response_dict and "documents" in response_dict["data"]:
Expand Down Expand Up @@ -273,6 +274,7 @@ def update_document(self, document: Dict, id_key: str):
filter={id_key: document_id},
update={"$set": document},
options={"returnDocument": "after"},
projection={"*": 1},
)

document[id_key] = document_id
Expand Down

0 comments on commit c4f1cc4

Please sign in to comment.