• Markus Koller's avatar
    Add RelativePositioning.move_nulls_to_start helper · 07bc6987
    Markus Koller authored
    This mirrors the existing `move_nulls_to_end` and can be used to
    backfill existing records.
    
    The records are positioned at the start before any other records that
    already have a position set, while keeping the sequential order that
    the records are passed in.
    
    This also switches from `save` to `update_column` to avoid unnecessary
    queries for things like uniqueness validation.
    07bc6987
relative_positioning.rb 8.35 KB