class Marten::Conf::GlobalSettings::Database
- Marten::Conf::GlobalSettings::Database
- Reference
- Object
Overview
Defines the configuration of a specific database connection.
Defined in:
marten/conf/global_settings/database.crConstructors
Instance Method Summary
-
#backend : String?
Returns the connection backend of the database.
-
#backend=(val : Nil | String | Symbol)
Allows to set the connection backend of the database.
-
#checkout_timeout : Float64
Returns the number of seconds to wait for a connection to become available when the max pool size is reached.
-
#checkout_timeout=(checkout_timeout : Float64)
Allows to set the seconds to wait for a connection to become available when the max pool size is reached.
-
#host : String?
Returns the database host.
-
#host=(val : Nil | String | Symbol)
Allows to set the database host.
-
#id : String
Returns the identifier of the database.
-
#initial_pool_size : Int32
Returns the initial number of connections created for the database connections pool.
-
#initial_pool_size=(initial_pool_size : Int32)
Allows to set the initial number of connections created for the database connections pool.
-
#max_idle_pool_size : Int32
Returns the maximum number of idle connections for the database connections pool.
-
#max_idle_pool_size=(max_idle_pool_size : Int32)
Allows to set the maximum number of idle connections for the database connections pool.
-
#max_pool_size : Int32
Returns the maximum number of connections that will be held by the database connections pool.
-
#max_pool_size=(max_pool_size : Int32)
Allows to set the maximum number of connections that will be held by the database connections pool.
-
#name : String?
Returns the database name.
-
#name=(val : Nil | Path | String | Symbol)
Allows to set the database name.
-
#options : Hash(String, String)
Returns the database options.
-
#options=(options : Hash(String, String))
Allows to set additional database options.
-
#password : String?
Returns the database password.
-
#password=(val : Nil | String | Symbol)
Allows to set the database password.
-
#port : Int32?
Returns the database port.
-
#port=(val : Int | Nil)
Allows to set the database port.
-
#retry_attempts : Int32
Returns the maximum number of attempts to retry re-establishing a lost connection.
-
#retry_attempts=(retry_attempts : Int32)
Allows to set the maximum number of attempts to retry re-establishing a lost connection.
-
#retry_delay : Float64
Returns the delay to wait between each retry at re-establishing a lost connection.
-
#retry_delay=(retry_delay : Float64)
Allows to set the delay to wait between each retry at re-establishing a lost connection.
-
#user : String?
Returns the database user name.
-
#user=(val : Nil | String | Symbol)
Allows to set the database user name.
Constructor Detail
Instance Method Detail
Returns the number of seconds to wait for a connection to become available when the max pool size is reached.
Allows to set the seconds to wait for a connection to become available when the max pool size is reached.
Returns the initial number of connections created for the database connections pool.
Allows to set the initial number of connections created for the database connections pool.
Returns the maximum number of idle connections for the database connections pool.
When released, a connection will be closed only if there are already #max_idle_pool_size
idle connections.
Allows to set the maximum number of idle connections for the database connections pool.
Returns the maximum number of connections that will be held by the database connections pool.
When set to 0
, this means that there is no limit to the number of connections.
Allows to set the maximum number of connections that will be held by the database connections pool.
Returns the maximum number of attempts to retry re-establishing a lost connection.
Allows to set the maximum number of attempts to retry re-establishing a lost connection.
Returns the delay to wait between each retry at re-establishing a lost connection.
Allows to set the delay to wait between each retry at re-establishing a lost connection.