Skip to content

Commit

Permalink
Override default NULL FIRST and NULL LAST with nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseChavez committed Jul 2, 2024
1 parent 463a7e4 commit 185ae3a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/arel/visitors/sqlserver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@ def visit_Arel_Nodes_Limit o, collector
end
end

# Override the default in arel ToSql class
def visit_Arel_Nodes_NullsFirst(o, collector)
visit o.expr, collector
end

# Override the default in arel ToSql class
def visit_Arel_Nodes_NullsLast(o, collector)
visit o.expr, collector
end

def visit_Arel_Nodes_Grouping(o, collector)
remove_invalid_ordering_from_select_statement(o.expr)
super
Expand Down

0 comments on commit 185ae3a

Please sign in to comment.