VertX SqlClientApi/SqlConnection 问题

VertX SqlClientApi/SqlConnection Question

文档说

The JDBC Client API created in Vert.x 3 is now deprecated and instead the new SQL Client API should be used. It will remain supported for the life time of Vert.x 4 to allow applications to be migrated to the new SQL Client API.

这 class 似乎在自动提交模式下工作。如果我在一个服务中有多个数据库调用,这应该如何处理事务一致性?是否计划“提交”、“回滚”也将像在 SQLConnection 中一样可用?

感谢

您可以查看 https://vertx.io/docs/apidocs/io/vertx/sqlclient/Pool.html#withTransaction-java.util.function.Function- 中新客户端事务 API 的 Javadocs,JDBCClient 将执行从禁用自动提交模式开始到以提交或回滚执行结束的块。