lidavidm commented on code in PR #3607:
URL: https://github.com/apache/arrow-adbc/pull/3607#discussion_r2454033720
##########
c/include/arrow-adbc/adbc.h:
##########
@@ -2013,6 +2181,74 @@ AdbcStatusCode AdbcStatementExecuteQuery(struct
AdbcStatement* statement,
struct ArrowArrayStream* out,
int64_t* rows_affected, struct
AdbcError* error);
+/// \brief Retrieve the next result set from a multi-statement execution
+///
+/// This invalidates any prior result sets. This AdbcStatement must
+/// outlive the returned ArrowArrayStream.
+///
+/// \since ADBC API revision 1.2.0
+///
+/// \param[in] statement The statement to retrieve the next result set from.
+/// \param[out] out The results. Pass NULL if the client does not
+/// expect a result set.
+/// \param[out] rows_affected The number of rows affected if known,
+/// else -1. Pass NULL if the client does not want this information.
+/// \param[out] error An optional location to return an error
+/// message if necessary.
+///
+/// \return ADBC_STATUS_NOT_IMPLEMENTED if the driver does not support
+/// multi-result set execution, ADBC_STATUS_OK if next result set is
+/// being returned successfully. ADBC_STATUS_NOT_FOUND is returned
+/// when there are no more result sets.
+ADBC_EXPORT
+AdbcStatusCode AdbcStatementNextResultSet(struct AdbcStatement* statement,
+ struct ArrowArrayStream* out,
+ int64_t* rows_affected,
+ struct AdbcError* error);
+
+/// \brief Execute a statement asynchronously and get the results.
+///
+/// This will invalidate any prior result sets. This AdbcStatement must
+/// outlive the returned ArrowAsyncDeviceStreamHandler.
+///
+/// \since ADBC API revision 1.2.0
+///
+/// \param[in] statement The statement to execute.
+/// \param[in] handler The async stream handler whose callbacks to use
+/// to deliver results.
+/// \param[out] rows_affected The number of rows affected if known, else -1.
Pass
+/// NULL if the client does not want this information.
+/// \param[out] error An optional location to return an error message if
necessary.
+///
+/// \return ADBC_STATUS_NOT_IMPLEMENTED if the driver does not support async
execution,
+/// ADBC_STATUS_OK if the execution has started successfully.
+ADBC_EXPORT
+AdbcStatusCode AdbcStatementExecuteQueryAsync(
+ struct AdbcStatement* statement, struct ArrowAsyncDeviceStreamHandler*
handler,
+ int64_t* rows_affected, struct AdbcError* error);
Review Comment:
I guess it could go in `ArrowAsyncProducer`'s `additional_metadata`. Or,
provide an `AdbcAsyncProducerGetMetadata(ArrowAsyncProducer*)` like how we have
an `AdbcErrorFromArrayStream`. (Speaking of which, we need an equivalent of
that for the async stream.)
--
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]