support SPI 0.9 M2 (R2DBC-15)

[R2DBC-36] Implement statement timeout Created: 2021-07-09  Updated: 2021-07-12  Resolved: 2021-07-12

Status: Closed
Project: MariaDB Connector/R2DBC
Component/s: Specification
Affects Version/s: None
Fix Version/s: 1.1.0-beta

Type: Sub-Task Priority: Major
Reporter: Diego Dupin Assignee: Diego Dupin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Introduction of `Connection.setStatementTimeout(Duration)` methods.

spec:
== Limiting execution time for statements

The statement timeout can be configured on the `Connection` level allowing to associate the connection with a timeout limit.
By default there is no limit on the amount of time allowed for a running statement to complete unless specified through options.
The minimum amount of time can be used to either let the data source cancel the statement or attempt a client-side cancellation.

Once the data source has had an opportunity to process the request to terminate the running command, a `R2dbcTimeoutException` is raised to the client and no additional processing can occur against the previously running command without re-executing a statement.

The timeout applies to statements through a combination of `Statement#execute`, `Batch#execute` and `Result` consumption.
In the case of `Batch`/`Statement` batching, it is vendor-specific whether the timeout is applied to individual SQL commands or the entire batch.


Generated at Thu Feb 08 03:32:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.