-
Notifications
You must be signed in to change notification settings - Fork 1k
config properties database
v3.0.4
object (database)
| Property | Type | Required | Nullable | Defined by |
|---|---|---|---|---|
| conn_max_lifetime | integer |
Optional | cannot be null | Config |
| conn_max_idletime | integer |
Optional | cannot be null | Config |
| database | string |
Optional | cannot be null | Config |
| dialect | string |
Optional | cannot be null | Config |
| host | string |
Optional | cannot be null | Config |
| idle_pool | integer |
Optional | cannot be null | Config |
| password | string |
Optional | cannot be null | Config |
| pool | integer |
Optional | cannot be null | Config |
| port | string |
Optional | cannot be null | Config |
| url | string |
Optional | cannot be null | Config |
| user | string |
Optional | cannot be null | Config |
conn_max_lifetime sets the maximum amount of time a connection may be reused.
It must be a (possibly signed) sequence of decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
conn_max_lifetime
-
is optional
-
cannot be null
integer
conn_max_idletime sets the maximum number of connections in the idle connection pool.
It must be a (possibly signed) sequence of decimal numbers, each with optional fraction and a unit suffix,
such as "300ms", or "2h45m".
Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
conn_max_idletime
-
is optional
-
cannot be null
integer
database determines the name of the database schema to use.
database
-
is optional
-
cannot be null
string
The default value is:
"hanko"dialect is the name of the database system to use.
dialect
-
is optional
-
cannot be null
string
enum: the value of this property must be equal to one of the following values:
| Value | Explanation |
|---|---|
"postgres" |
|
"mysql" |
|
"mariadb" |
|
"cockroach" |
The default value is:
"postgres"host is the host the database system is running on.
host
-
is optional
-
cannot be null
string
The default value is:
"localhost"idle_pool sets the maximum number of connections in the idle connection pool.
idle_pool
-
is optional
-
cannot be null
integer
The default value is:
0password is the password for the database user to use for connecting to the database.
password
-
is optional
-
cannot be null
string
The default value is:
"hanko"pool sets the maximum number of open connections to the database.
pool
-
is optional
-
cannot be null
integer
The default value is:
5port is the port the database system is running on.
port
-
is optional
-
cannot be null
string
The default value is:
"5432"url is a datasource connection string. It can be used instead of the rest of the database configuration
options. If this url is set then it is prioritized, i.e. the rest of the options, if set, have no effect.
Schema: dialect://username:password@host:port/database
url
-
is optional
-
cannot be null
string
postgres://hanko:hanko@localhost:5432/hanko
user is the database user to use for connecting to the database.
user
-
is optional
-
cannot be null
string
The default value is:
"hanko"