Add pagination support and enforce documentation sync#8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| def delete_triplet(self, subj: str, pred: str, obj: str) -> None: | ||
| predicate = self._sanitize_predicate(pred) | ||
| cypher = ( | ||
| "MATCH (a {uuid: $subj})-[r:`{predicate}`]->(b {uuid: $obj}) " | ||
| "DELETE r" | ||
| ) | ||
| params = {"subj": str(subj), "obj": str(obj)} |
There was a problem hiding this comment.
Format predicate in Memgraph delete_triplet query
The Memgraph driver’s delete_triplet constructs the Cypher with a {predicate} placeholder but never interpolates it (the string literal is not an f-string or formatted). As a result the driver executes MATCH (a {uuid: $subj})-[r:{predicate}]->(b {uuid: $obj}) DELETE r, which is invalid Cypher and will never delete the intended relationship. Any call to MemoryManager.delete_triplet against a Memgraph backend will therefore silently fail. The predicate should be inserted into the query (after sanitizing) before execution.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_b_68ee1c9ee92c83218cbbebce8b0667b8