r2dbc / r2dbc-mssql

R2DBC Driver for Microsoft SQL Server using TDS (Tabular Data Stream) Protocol
Apache License 2.0
183 stars 32 forks source link

Add support for configuring PreparedStatementCache #229

Open vijayakumarsuraj opened 2 years ago

vijayakumarsuraj commented 2 years ago

Make sure that:

Issue description

https://github.com/r2dbc/r2dbc-mssql/issues/227 - Allow configuring the prepared statement cache

New Public APIs

Additional context

The preparedStatementCache discovery option behaves similar to the one in r2dbc-postgresql.

mp911de commented 2 years ago

Thanks a lot. For a proper implementation of the cache we need to call sp_unprepare <handle> somewhere, ideally when the cache entry is being removed. Calling unprepare can interfere with the ongoing query so that might require some special attention.

xnart commented 2 years ago

For now, can we provide only NoPreparedStatementCache to allow disabling cache ? If it is ok i can create new PR.