CurtHagenlocher commented on code in PR #3607:
URL: https://github.com/apache/arrow-adbc/pull/3607#discussion_r2453185296
##########
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,
Review Comment:
It would be nice if this also worked for "schema-only" evaluation. (I
started down this road last year and my work-in-progress was at
[https://github.com/apache/arrow-adbc/compare/main...CurtHagenlocher:arrow-adbc:MoreResults](https://github.com/apache/arrow-adbc/compare/main...CurtHagenlocher:arrow-adbc:MoreResults)
##########
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,
Review Comment:
It would be nice if this also worked for "schema-only" evaluation. (I
started down this road last year and my work-in-progress was at
[https://github.com/apache/arrow-adbc/compare/main...CurtHagenlocher:arrow-adbc:MoreResults](https://github.com/apache/arrow-adbc/compare/main...CurtHagenlocher:arrow-adbc:MoreResults).)
--
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]