English | 简体中文

api-docs / org.ktorm.global / global

global

val Database.Companion.global: Database (source code)

Deprecated: ktorm-global will be removed in the future, please migrate to the standard API.

The global database instance, Ktorm uses this property to obtain a database when any SQL is executed.

By default, it’s the lasted connected one, but it may change if the invoke operator is used.

Note that you must connect to the database via Database.Companion.connectGlobally first, otherwise an
exception will be thrown.

See Also

Database.invoke