Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DELETE support to planner #6

Open
jakewins opened this issue Feb 16, 2020 · 0 comments
Open

Add DELETE support to planner #6

jakewins opened this issue Feb 16, 2020 · 0 comments

Comments

@jakewins
Copy link
Owner

jakewins commented Feb 16, 2020

eg.

MATCH (n:Person)
DELETE n

This would involve adding delete <identifier> to the parser, and extending the frontend to understand it, so that it emits an additional LogicalPlan operator. See how the CREATE operator is added here. The delete operator would be saying "delete the thing in slot X", where "slot x" is the slot that the n identifier go assigned to.

You can check that an identifier has a slot assignment (as a result of a match or a create clause) by converting the string you get out of the parse to a Token (via pc.tokenize(..)) and then calling pc.is_bound(..), like this.

The create PR has examples of one approach to writing tests here.

Finally, you'll need to modify the GRAM backend to panic or something if it gets a logical plan with delete in it, for now.

@jakewins jakewins added the good first issue Good for newcomers label Feb 16, 2020
@jakewins jakewins removed the good first issue Good for newcomers label Feb 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant