WillAyd commented on code in PR #714:
URL: https://github.com/apache/arrow-adbc/pull/714#discussion_r1209465211
##########
c/driver/postgresql/connection.cc:
##########
@@ -146,15 +185,17 @@ class PqGetObjectsHelper {
}
AdbcStatusCode GetObjects() {
- PqResultHelper curr_db_helper = PqResultHelper{conn_, "SELECT
current_database()"};
- if (curr_db_helper.Status() == PGRES_TUPLES_OK) {
- assert(curr_db_helper.NumRows() == 1);
- auto curr_iter = curr_db_helper.begin();
- PqResultRow db_row = *curr_iter;
- current_db_ = std::string(db_row[0].data);
- } else {
- return ADBC_STATUS_INTERNAL;
- }
+ std::vector<std::string> _;
Review Comment:
OK added the alternate constructor. The caller is still responsible for
calling `Prepare` in this case even though it is overkill when there are no
parameters. Could either create a separate class for statements that don't need
to be prepared, or make the class more intelligent to recognize if it needs it
or not. Leaving that as a follow up exercise
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]