英文:
Does R2DBC support the "ApplicationIntent=ReadOnly" parameter for SQL Server connections?
问题
我正在进行一个项目,该项目利用了R2DBC库进行响应式数据库访问。然而,我不确定R2DBC是否支持SQL Server连接的ApplicationIntent=ReadOnly
参数。这个参数通常用于Microsoft SQL Server连接字符串中,用于指示应用程序只打算从数据库中进行读取,如果可用的话,允许SQL Server将连接重定向到只读副本。
我已经查阅了官方的R2DBC文档,但没有找到关于这个参数的具体信息。我想知道是否有人有使用R2DBC与SQL Server的经验,并能提供关于R2DBC是否支持"ApplicationIntent=ReadOnly"
或是否有任何实现类似行为的解决方法的见解。
如果R2DBC不直接支持这个参数,我将感谢您提供关于确保R2DBC连接到SQL Server被视为只读的替代方法的建议,例如在数据库级别配置SQL Server连接。
英文:
I'm working on a project that utilizes the R2DBC library for reactive database access. However, I'm unsure if R2DBC supports the ApplicationIntent=ReadOnly
parameter for SQL Server connections. This parameter is typically used in Microsoft SQL Server connection strings to indicate that the application intends to only read from the database, allowing SQL Server to redirect the connection to a read-only replica if available.
I've reviewed the official R2DBC documentation, but couldn't find any specific information about this parameter. I'm wondering if anyone has experience using R2DBC with SQL Server and can provide insights on whether R2DBC supports "ApplicationIntent=ReadOnly"
or if there are any workarounds to achieve a similar behavior.
If R2DBC doesn't directly support this parameter, I'd appreciate suggestions on alternative approaches to ensure that R2DBC connections to SQL Server are treated as read-only, such as configuring the SQL Server connection at the database level.
答案1
得分: 0
感谢@AlwaysLearning,在探索各种选项并寻找解决方案后,我主动编辑了mssql-r2dbc
的源代码。
我深入研究了代码库,进行了必要的修改以支持在SQL Server连接中使用"ApplicationIntent=ReadOnly"
参数。
英文:
Thanks to @AlwaysLearning, After exploring various options and searching for solutions, I took the initiative to edit the mssql-r2dbc
sources.
I delved into the codebase, making the necessary modifications to incorporate the support for the "ApplicationIntent=ReadOnly"
parameter in SQL Server connections.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论