connectWithSpringSupportGlobally
Deprecated
ktorm-global will be removed in the future, please migrate to the standard API.
Connect to a database using a DataSource with the Spring support enabled and save the returned database instance to Database.Companion.global.
Once the Spring support is enabled, the transaction management will be delegated to the Spring framework, so the useTransaction function is not available anymore, we need to use Spring's Transactional annotation instead.
This function also enables the exception translation, which can convert any SQLException thrown by JDBC to Spring's DataAccessException and rethrow it.
Return
the new-created database object.
Parameters
the data source used to obtain SQL connections.
the dialect, auto-detects an implementation by default using JDK ServiceLoader facility.
logger used to output logs, auto-detects an implementation by default.
whether we need to always quote SQL identifiers in the generated SQLs.
whether we need to output the generated SQLs in upper case.