Erixonich commented on code in PR #6352:
URL: https://github.com/apache/ignite-3/pull/6352#discussion_r2254144243


##########
modules/platforms/cpp/ignite/client/transaction/transactions.h:
##########
@@ -40,15 +41,33 @@ class transactions {
     // Delete
     transactions() = delete;
 
+    /**
+     * Starts a new transaction.
+     *
+     * @param tx_opts Transaction options.
+     * @return A new transaction.
+     */
+    IGNITE_API transaction begin(transaction_options tx_opts) {
+        return sync<transaction>([this, &tx_opts](auto callback) { 
begin_async(std::move(callback), tx_opts); });
+    }
+
     /**
      * Starts a new transaction.
      *
      * @return A new transaction.
      */
     IGNITE_API transaction begin() {
-        return sync<transaction>([this](auto callback) { 
begin_async(std::move(callback)); });
+        return begin({});
     }
 
+    /**
+     * Starts a new transaction asynchronously.
+     *
+     * @param callback Callback to be called with a new transaction or error 
upon completion of asynchronous operation.
+     * @param tx_opts Transaction options.
+     */
+    IGNITE_API void begin_async(ignite_callback<transaction> callback, 
transaction_options tx_opts);

Review Comment:
   done



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to