-
Notifications
You must be signed in to change notification settings - Fork 18k
database/sql: way to execute the SQL directly without prepare for IBM/DB2 #37014
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
Comments
Hello @akhilravuri1 - could you please fill the issue template entirely explaining what is it that you are trying to do ? A self-contained independant code sample is preferred. |
Hi @agnivade Sorry, I have modified my comment. Thanks, |
Looking at https://github.com/ibmdb/go_ibm_db it looks like the driver doesn't implement the driver.Queryer interface. Once that is implemented, it will operate as desired. |
It looks like that above driver uses ODBC3 to implement connections. There may be a limitation there. Furthermore, it looks like it has a dedicated API call to create or drop tables. The issue isn't with database/sql, but likely with your driver. |
Hi @kardianos Akhil. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
NO
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was trying to create a view in the BIGSQL database by IBM using the go_ibm_db package which is based on your database/sql package but it was not created because your database/sql uses prepare and query API's even if we call exec. But for creating a view and altering table BIGSQL throws an error if we use prepare and query instead of execdirect.
What did you expect to see?
view is created and the table is altered successfully.
What did you see instead?
BIGSQL returns statement not supported.
Do you have any plans for supporting ExecDirect api?
Thanks,
Akhil
The text was updated successfully, but these errors were encountered: