class

Marten::Conf::GlobalSettings::Database

Inherits Reference / Object

Defines the configuration of a specific database connection.

Constructors

new(id : String)
Source

Instance methods

backend

Returns the connection backend of the database.

Source
backend=(val : Nil | String | Symbol)

Allows to set the connection backend of the database.

Source
checkout_timeout

Returns the number of seconds to wait for a connection to become available when the max pool size is reached.

Source
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.

Source
from_url(url : String)

Allows to set the database configuration from a connection URL.

Source
host

Returns the database host.

Source
host=(val : Nil | String | Symbol)

Allows to set the database host.

Source
id

Returns the identifier of the database.

Source
initial_pool_size

Returns the initial number of connections created for the database connections pool.

Source
initial_pool_size=(initial_pool_size : Int32)

Allows to set the initial number of connections created for the database connections pool.

Source
max_idle_pool_size

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.

Source
max_idle_pool_size=(max_idle_pool_size : Int32)

Allows to set the maximum number of idle connections for the database connections pool.

Source
max_pool_size

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.

Source
max_pool_size=(max_pool_size : Int32)

Allows to set the maximum number of connections that will be held by the database connections pool.

Source
name

Returns the database name.

Source
name=(val : Nil | Path | String | Symbol)

Allows to set the database name.

Source
options

Returns the database options.

Source
options=(options : Hash(String, String))

Allows to set additional database options.

Source
password

Returns the database password.

Source
password=(val : Nil | String | Symbol)

Allows to set the database password.

Source
port

Returns the database port.

Source
port=(val : Int | Nil)

Allows to set the database port.

Source
retry_attempts

Returns the maximum number of attempts to retry re-establishing a lost connection.

Source
retry_attempts=(retry_attempts : Int32)

Allows to set the maximum number of attempts to retry re-establishing a lost connection.

Source
retry_delay

Returns the delay to wait between each retry at re-establishing a lost connection.

Source
retry_delay=(retry_delay : Float64)

Allows to set the delay to wait between each retry at re-establishing a lost connection.

Source
user

Returns the database user name.

Source
user=(val : Nil | String | Symbol)

Allows to set the database user name.

Source