File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 55- [ #1244 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1244 ) Allow INSERT statements with SELECT notation
66- [ #1247 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1247 ) Fix queries with date and date-time placeholder conditions
77- [ #1249 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1249 ) Binary basic columns should be limitable
8+ - [ #1255 ] ( https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/1255 ) Fixed the ordering of optimizer hints in the generated SQL
89
910## v7.2.1
1011
Original file line number Diff line number Diff line change @@ -140,13 +140,10 @@ def visit_Arel_Nodes_SelectStatement(o, collector)
140140 collector = visit o . with , collector
141141 collector << " "
142142 end
143- collector = o . cores . inject ( collector ) { |c , x |
144- if x . is_a? Arel ::Nodes ::SelectCore
145- # optimizer hints in SQL Server have to be at the very end of the query, so we need to hold onto these for now
146- optimizer_hints = x . optimizer_hints
147- end
148- visit_Arel_Nodes_SelectCore ( x , c )
149- }
143+ collector = o . cores . inject ( collector ) do |collect , core |
144+ optimizer_hints = core . optimizer_hints if core . optimizer_hints
145+ visit_Arel_Nodes_SelectCore ( core , collect )
146+ end
150147 collector = visit_Orders_And_Let_Fetch_Happen o , collector
151148 collector = visit_Make_Fetch_Happen o , collector
152149 collector = maybe_visit optimizer_hints , collector
You can’t perform that action at this time.
0 commit comments