pub struct DatabaseRuntimeConfig {
pub url: Option<String>,
pub pool_min: usize,
pub pool_max: usize,
pub connect_timeout_ms: u64,
pub idle_timeout_ms: u64,
pub ssl_mode: String,
}Expand description
Database connection pool runtime configuration.
The [database] section in fraiseql.toml is optional. When absent,
connection parameters fall back to the DATABASE_URL environment variable
or the --database CLI flag.
Supports ${VAR} environment variable interpolation in the url field:
[database]
url = "${DATABASE_URL}"
pool_min = 2
pool_max = 20
ssl_mode = "prefer"Fields§
§url: Option<String>Database connection URL. Supports ${VAR} interpolation.
If not set here, the runtime falls back to the DATABASE_URL environment
variable or the --database CLI flag.
pool_min: usizeMinimum connection pool size. Default: 2.
pool_max: usizeMaximum connection pool size. Default: 20.
connect_timeout_ms: u64Connection acquisition timeout in milliseconds. Default: 5 000 (5 s).
idle_timeout_ms: u64Idle connection lifetime in milliseconds. Default: 600 000 (10 min).
ssl_mode: StringPostgreSQL SSL mode: "disable", "allow", "prefer", or "require".
Default: "prefer".
Implementations§
Trait Implementations§
Source§impl Clone for DatabaseRuntimeConfig
impl Clone for DatabaseRuntimeConfig
Source§fn clone(&self) -> DatabaseRuntimeConfig
fn clone(&self) -> DatabaseRuntimeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more