Skip to main content

is_custom_setting

Function is_custom_setting 

Source
pub fn is_custom_setting(name: &str) -> bool
Expand description

Whether name is a custom setting a service may set for row-level security: two or more parts of lower-case ASCII letters, digits, and underscores, joined by dots, such as app.tenant. A name with no dot is Postgres’s own, such as role or search_path, which this never sets.

assert!(axa_postgres_sqlx::is_custom_setting("app.tenant"));
assert!(!axa_postgres_sqlx::is_custom_setting("search_path"));