Skip to main content

mint_scope_token

Function mint_scope_token 

Source
pub fn mint_scope_token() -> String
Expand description

Fresh 16-character random token (~95 bits) for scope-internal names.

Each RandomState is seeded independently, so successive draws are unrelated; a collision requires predicting the token. Callers wrap the token in their own recognizable prefix — sq_…_ for sub-SELECT renames ([mint_scope_prefix]), gact_… for graph-active variables, __text_h… for the text plugin’s subject-mode carriers — so the names stay recognizable in EXPLAIN output while remaining unguessable.