-
Notifications
You must be signed in to change notification settings - Fork 1
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
mutations via native queries #7
Conversation
let native_query = config | ||
.native_queries | ||
.iter() | ||
.find(|native_query| native_query.name == name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment on PR #5. We will want a more performant way to look up native queries than linear search. This is within a map
now so potentially O(m * n) where m is the number of operations and n is the number of native queries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I filed https://hasurahq.atlassian.net/browse/MDB-91 to follow up
Implements a mutation endpoint to run procedures. I added an example native query to fixtures,
insertArtist
, to demonstrate.I'll follow up with another PR that implements arguments to native queries where I'll replace the hard-coded inputs.
I'm having a problem querying the
Artist
collection which I think is unrelated, but I'm going to check that out and likely submit a bug fix PR. I confirmed thatinsertArtist
does update the database correctly, and I wanted to get this PR out.Ticket: https://hasurahq.atlassian.net/browse/MDB-86