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

plan to support Update/Insert/Delete ? #32

Closed
csimplestring opened this issue Dec 30, 2021 · 4 comments · Fixed by #93
Closed

plan to support Update/Insert/Delete ? #32

csimplestring opened this issue Dec 30, 2021 · 4 comments · Fixed by #93

Comments

@csimplestring
Copy link

Hi, I found the README file said that:
Only read operations are supported, such as SHOW and SELECT.

Is there any plan to support Update/Insert/Delete?

Thanks in advance.

@nineinchnick
Copy link
Member

nineinchnick commented Dec 31, 2021

A while ago, in #16, I added support for ExecContext and implemented methods of the Result interface. I only did this to support the USE statement. There are no tests for DML statements like INSERT, UPDATE and DELETE, so this statement in the README is correct. But you should try it, as it might not require any extra work.

Please let us know if it does work, but we can keep this issue open until we add proper tests.

@csimplestring
Copy link
Author

@nineinchnick it works! and it does not require any extra work. Thanks!

@csimplestring
Copy link
Author

@nineinchnick does it support transaction? I roughly walked thru the code and figure out this go-client is using TrinoDB REST API to implement the sql driver interface. So I think transaction is not supported due to the stateless in http's nature. But I am not 100% sure.

@nineinchnick
Copy link
Member

Transaction statements should work, but we don't have tests for this.

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

Successfully merging a pull request may close this issue.

2 participants