lidavidm commented on PR #954:
URL: https://github.com/apache/arrow-adbc/pull/954#issuecomment-1663864465

   ```cpp
   
   struct ArrowArrayStream stream = ...;
   
   while (true) {
     struct ArrowArray batch;
     if (int code = stream.get_next(&stream, &batch); code != 0) {
       struct AdbcError* error = AdbcErrorFromArrayStream(&stream);
       if (error != nullptr) {
         std::cout << error->message << " SQLSTATE: " << error->sqlstate << 
std::endl;
         // Also use AdbcErrorGetDetailCount, etc.
       } else {
         std::cout << stream.get_last_error(&stream) << std::endl;
       }
     } else if (batch.release == nullptr) {
       break;
     }
     // Process batch
   }
   ```


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