Skip to content

Commit

Permalink
cleanup: aql_return_value
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Jan 19, 2024
1 parent d65598c commit c9537c5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions adbnx_adapter/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,13 +446,9 @@ def __fetch_adb_docs(
"""
aql_return_value = "doc"
if explicit_metagraph:
edge_keys = "_from: doc._from, _to: doc._to" if is_edge else ""
aql_return_value = f"""
MERGE(
KEEP(doc, {list(attributes)}),
{{"_id": doc._id, {edge_keys}}}
)
"""
default_keys = ["_id", "_key"]
default_keys += ["_from", "_to"] if is_edge else []
aql_return_value = f"KEEP(doc, {list(attributes) + default_keys})"

col_size: int = self.__db.collection(col).count()

Expand Down

0 comments on commit c9537c5

Please sign in to comment.