-
Notifications
You must be signed in to change notification settings - Fork 820
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
Code sample - 23c JDBC Reactive Extensions #317
base: main
Are you sure you want to change the base?
Code sample - 23c JDBC Reactive Extensions #317
Conversation
1c73dce
to
030f8ee
Compare
private Flow.Publisher<Boolean> createTable(OracleConnection connection) throws SQLException { | ||
|
||
OraclePreparedStatement createTableStatement = (OraclePreparedStatement) connection | ||
.prepareStatement("CREATE TABLE employee_names (" + "id NUMBER PRIMARY KEY, " |
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.
Using the async APIs for a DDL wouldn't it be common. A better code sample should show a SELECT query and a DML.
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.
As we discussed, I don't disagree with you on that, but at the end of the day, the goal is to present the use of our async API and the extensions offering, and it can be used with any SQL statement (DDL, DQL, DML, DCL and TCL) as it will be issued in an async way regardless of the semantics of the SQL statement, so the purpose of it is not defeated at all.
I proposed to create part 2 of this blog post (which just wanted to serve as an intro as no blog post existed about such API) as a more complete segway and then explore CRUD scenarios in it, so I added it as a TODO item for me.
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.
Also, please note that the official documentation also uses DDL as an example - https://docs.oracle.com/en/database/oracle/oracle-database/21/jjdbc/jdbc-reactive-extensions.html#GUID-1C40C43B-3823-4848-8B5A-D2F97A82F79B
Code sample - 23c JDBC Reactive Extensions
Signed-off-by: Juarez Barbosa juarez.barbosa@oracle.com