Skip to main content

set_config_on

Function set_config_on 

Source
pub async fn set_config_on(
    conn: &mut PgConnection,
    field: &str,
    contents: ConfigOption,
) -> Result<(), ConfigError>
Expand description

Upserts a config field on the given connection (string → config, blob → configdata). The upsert keys on lower(field) (see the SQL), so it is idempotent and case-insensitive.

§Errors

ConfigError::DB on a database error, ConfigError::NoConfig if the row is missing for an update.