Skip to main content

set_runtime_acronyms

Function set_runtime_acronyms 

Source
pub fn set_runtime_acronyms(extra: &[String])
Expand description

The canonical field-name → snake_case JSONB-key rule.

Re-exported from fraiseql-db so the SQL projection generators and this crate’s Rust entity projector share one definition — eliminating the historical drift where two copies disagreed on acronym field names (userIDuser_id, never user_i_d). See fraiseql_db::utils::to_snake_case. Install the project’s acronym additions (from [fraiseql.naming] acronyms) on top of the built-in defaults.

Idempotent — only the first call wins, so the server (at boot) and the CLI (at compile) each call it once. Terms are trimmed and lowercased; empties ignored.