Skip to main content

inlined_pointer_defaults

Function inlined_pointer_defaults 

Source
pub fn inlined_pointer_defaults(
    td: &TypeDescriptor,
    schema: &SchemaDescriptor,
) -> Vec<(String, String)>
Expand description

The pointers whose PyQL default an insert has to expand into its own shape, paired with that default, because column_default_sql cannot render it.

Expanding a default means adding one shape element per unspecified pointer, which is what makes an object-returning default like created_by := account_of_transaction() work at all. Here the defaults a column DEFAULT does hold keep using it, so only the remainder needs the query.