Skip to content
  • Étienne Barrié's avatar
    c3e1cf51
    Check for default function before attribute changes for partial inserts · c3e1cf51
    Étienne Barrié authored
    We're limiting the attributes being used for INSERTs to those without a
    default function and no changes. But we can first check for the presence
    of a default function before checking for changes.
    
    That's because the default function will be stored in the schema cache
    and amounts to a hash fetch in column_for_attribute, while checking for
    changes potentially calls user code when using the Active Record
    Attributes API.
    c3e1cf51
    Check for default function before attribute changes for partial inserts
    Étienne Barrié authored
    We're limiting the attributes being used for INSERTs to those without a
    default function and no changes. But we can first check for the presence
    of a default function before checking for changes.
    
    That's because the default function will be stored in the schema cache
    and amounts to a hash fetch in column_for_attribute, while checking for
    changes potentially calls user code when using the Active Record
    Attributes API.
Loading