lidavidm commented on code in PR #714:
URL: https://github.com/apache/arrow-adbc/pull/714#discussion_r1209311440
##########
c/driver/postgresql/connection.cc:
##########
@@ -72,12 +72,48 @@ class PqResultRow {
// as expected prior to iterating
class PqResultHelper {
public:
- PqResultHelper(PGconn* conn, const char* query) : conn_(conn) {
+ PqResultHelper(PGconn* conn, const char* query, std::vector<std::string>
param_values,
+ struct AdbcError* error)
+ : conn_(conn), param_values_(param_values), error_(error) {
query_ = std::string(query);
result_ = PQexec(conn_, query_.c_str());
+ for (auto data : param_values) {
+ param_lengths_.push_back(data.length());
+ }
+ }
+
+ AdbcStatusCode Prepare() {
+ // TODO: make stmtName a unique identifier?
Review Comment:
A single connection can only handle a single query at a time anyways.
Though, exposing the name may be useful if we want to somehow expose managing
multiple prepared statements on a single connection. (I suppose that could be
one way to allow multiple AdbcStatement instances from a single AdbcConnection,
with the restriction that you can't use them concurrently, and that one result
set must be completely consumed before using a different statement.)
--
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]