Skip to main content

marker_call

Function marker_call 

pub fn marker_call(inner: &str) -> Option<MarkerCall<'_>>
Expand description

Parse the inner text of a @default(...) attribute — the text between the outer parentheses — as a marker call, or None if it does not start with one.

A call is: optional leading whitespace, a name of [A-Za-z0-9_], optional whitespace, then (; the closing ) is the one that balances it. The name, or the name alone with nothing after it, also classifies.

Names match case-insensitively. Postgres folds unquoted identifiers, so DEFAULT AutoIncrement() fails exactly like autoincrement(); an exact-case match would let AutoIncrement() through as an ordinary function. Only the exact spelling is accepted by the parser (MarkerCall::canonical, MarkerCall::is_bare), keeping the closed attribute surface exact-text (GHSA-69g4-xvcm-vm2j).