This commit modifies the `DefaultDatabaseClient` implementation in order to ensure lazier usage of the `Supplier<String>` passed to the sql method (`DatabaseClient#sql(Supplier)`). Since technically `DatabaseClient` is an interface that could have 3rd party implementations, the lazyness expectation is only hinted at in the `DatabaseClient#sql` javadoc. Possible caveat: some log statements attempt to reflect the now lazily resolved SQL string. Similarly, some exceptions can capture the SQL that caused the issue if known. We expect that these always occur after the execution of the statement has been attempted (see `ResultFunction`). At this point the SQL string will be accessible and logs and exceptions should reflect it as before. Keep an eye out for such strings turning into `null` after this change, which would indicate the opposite. Closes gh-29367 |
||
|---|---|---|
| .. | ||
| src | ||
| spring-r2dbc.gradle | ||