lidavidm commented on code in PR #692:
URL: https://github.com/apache/arrow-adbc/pull/692#discussion_r1198274168
##########
adbc.h:
##########
@@ -1138,6 +1293,43 @@ AdbcStatusCode AdbcStatementBindStream(struct
AdbcStatement* statement,
struct ArrowArrayStream* stream,
struct AdbcError* error);
+/// \brief Cancel execution of an in-progress query.
+///
+/// This can be called during AdbcStatementExecuteQuery (or similar),
+/// or while consuming an ArrowArrayStream returned from such.
+/// Calling this function should make the other functions return
+/// ADBC_STATUS_CANCELLED or ECANCELED (for ArrowArrayStream).
+///
+/// This must always be thread-safe (other operations are not).
+///
+/// \since ADBC API revision 1.1.0
+/// \addtogroup adbc-1.1.0
+///
+/// \param[in] statement The statement to cancel.
+/// \param[out] error An optional location to return an error
+/// message if necessary.
+///
+/// \return ADBC_STATUS_INVALID_STATE if there is no query to cancel.
+/// \return ADBC_STATUS_UNKNOWN if the query could not be cancelled.
+ADBC_EXPORT
+AdbcStatusCode AdbcStatementCancel(struct AdbcStatement* statement,
+ struct AdbcError* error);
+
+/// \brief Get a double property of the statement.
Review Comment:
There's a constant above motivating it. Also, 1) there's no Get* function at
all right now and 2) returning strings is really annoying due to allocations.
I could change this to return a string, the caveats would be either: 1) we
have to add some release-callback thing (C Data Interface-ish) or 2) we return
a const char*, _but_ calling this again or doing other things with the
statement will invalidate the pointer (SQLite-ish) or 3) we expect a
caller-allocated and/or fixed-size buffer (ODBC-ish)
--
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]