WillAyd commented on code in PR #683:
URL: https://github.com/apache/arrow-adbc/pull/683#discussion_r1193009258


##########
c/driver/postgresql/connection.cc:
##########
@@ -35,19 +37,77 @@ static const uint32_t kSupportedInfoCodes[] = {
     ADBC_INFO_DRIVER_VERSION, ADBC_INFO_DRIVER_ARROW_VERSION,
 };
 
+struct PqRecord {
+  const char* data;
+  const int len;
+  const bool is_null;
+};
+
+class PqResultRow {
+ public:
+  PqResultRow(pg_result* result, int row_num) : result_(result), 
row_num_(row_num) {
+    ncols_ = PQnfields(result);
+  }
+
+  PqRecord operator[](const int& col_num) {
+    const char* data = PQgetvalue(result_, row_num_, col_num);

Review Comment:
   Since we have ncols_ we could do bounds checking here - wasn't sure if we 
wanted to throw a C++ exception or need to stick with the arrow error handling



-- 
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]

Reply via email to