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

Support writes in the SQL adapter #7294

Open
msullivan opened this issue May 2, 2024 · 0 comments
Open

Support writes in the SQL adapter #7294

msullivan opened this issue May 2, 2024 · 0 comments

Comments

@msullivan
Copy link
Member

The trickiness here is in supporting all of the various special edgeqlisms that affect writes:

  • Rewrites
  • Triggers
  • Access policies? (We'd probably want that to work on reads also -- which is doable)
  • Cross-table exclusive constraints
  • Built-in foreign keys
  • required multi pointers

My theory for how to implement this, which is not fully formed, is to turn the DML operations in the SQL queries into not-DML CTEs, and then basically use the edgeql compiler to compile edgeql DML that is rigged up to take those CTEs as input. (Using a generalization of external rvars, probably).
That should then let all our hooks operate.

We'd also probably need to compile in assertions that link uuids actually map to a real object.

There are still a bunch of questions, especially around link tables, but I think this should be workable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant