connectGlobally
Deprecated
ktorm-global will be removed in the future, please migrate to the standard API.
Connect to a database by a specific connector function and save the returned database instance to Database.Companion.global.
Return
the new-created database object.
Parameters
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.
the connector function used to obtain SQL connections.
Deprecated
ktorm-global will be removed in the future, please migrate to the standard API.
Connect to a database using a DataSource and save the returned database instance to Database.Companion.global.
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.
Deprecated
ktorm-global will be removed in the future, please migrate to the standard API.
Connect to a database using the specific connection arguments and save the returned database instance to Database.Companion.global.
Return
the new-created database object.
Parameters
the URL of the database to be connected.
the full qualified name of the JDBC driver class.
the username of the database.
the password of the database.
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.