-
Notifications
You must be signed in to change notification settings - Fork 16
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
expose more APIs #64
expose more APIs #64
Conversation
Looks great to me I would just nitpick on the function names:
Similar for set. Those would align with Elixir naming and conventions. :) Thank you! |
No problem, I'll update these names and fix the test in |
I've done renaming these functions, but I'm not sure if we should leave It could be convenient maybe... What do you think? |
Actually, please ignore both of my comments above (I have deleted them). I think keeping only However, I don't think we can apply this to
|
Got it :) I also thought that this would be the better way (although the user may have to explicitly use |
I refactored it a bit so we now have less repetition in both Elixir and C++. |
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.
It looks glorious, I have dropped just one last comment. :)
@@ -402,18 +496,32 @@ defmodule Adbc.Connection do | |||
end | |||
end | |||
|
|||
defp handle_stream({:query, query_or_prepared, params, statement_options}, conn) do |
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.
I think we can delete the clause above now, no?
Also, should we allow statement_options
as optional argument to prepare
?
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.
Ah I finally found the above one which was used in query_pointer
, and I've added statement_options
to query_pointer
.
I tested it with explorer, and it seems that we're okay! (Although we will need to add statement options to |
Based on the design of ADBC, we probably have to expose more APIs, in particular these
{get,set}_option
functions. This PR added the following functionsAdbc.Connection.query_with_options/4
will callAdbc.Nif.adbc_statement_set_option/3
increate_statement
. Users can now send query with statement options using: