Skip to content

Commit 363a71e

Browse files
committed
Fixed syntax error from merge
1 parent d576fc3 commit 363a71e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ def self.sqlserver_connection(config) #:nodoc:
4848
conn["AutoCommit"] = autocommit
4949
ConnectionAdapters::SQLServerAdapter.new(conn, logger, [driver_url, username, password])
5050
end
51-
52-
51+
52+
5353
private
5454

5555
# Overwrite the ActiveRecord::Base method for SQL server.
@@ -59,7 +59,7 @@ def self.construct_finder_sql_for_association_limiting(options, join_dependency)
5959
is_distinct = !options[:joins].blank? || include_eager_conditions?(options) || include_eager_order?(options)
6060

6161
sql = "SELECT #{table_name}.#{connection.quote_column_name(primary_key)} FROM #{table_name} "
62-
62+
6363
if is_distinct
6464
sql << join_dependency.join_associations.collect(&:association_join).join
6565
add_joins!(sql, options[:joins], scope)
@@ -72,7 +72,7 @@ def self.construct_finder_sql_for_association_limiting(options, join_dependency)
7272
if sql =~ /GROUP\s+BY/i
7373
sql << ", #{table_name}.#{connection.quote_column_name(primary_key)}"
7474
else
75-
sql << " GROUP BY #{table_name}.#{connection.quote_column_name(primary_key)}"
75+
sql << " GROUP BY #{table_name}.#{connection.quote_column_name(primary_key)}"
7676
end #if sql =~ /GROUP BY/i
7777

7878
connection.add_order_by_for_association_limiting!(sql, options)
@@ -84,7 +84,6 @@ def self.construct_finder_sql_for_association_limiting(options, join_dependency)
8484

8585
return sanitize_sql(sql)
8686
end
87-
8887
end # class Base
8988

9089
module ConnectionAdapters
@@ -197,6 +196,7 @@ def new_time(year, mon, mday, hour, min, sec, microsec = 0)
197196
return nil if year.nil? || year == 0
198197
Time.time_with_datetime_fallback(Base.default_timezone, year, mon, mday, hour, min, sec, microsec) rescue nil
199198
end
199+
end
200200
end
201201

202202
# In ADO mode, this adapter will ONLY work on Windows systems,
@@ -505,7 +505,7 @@ def add_limit_offset!(sql, options)
505505
#if sql =~ /\.\[/ and tc =~ /\./ # if column quoting used in query
506506
# tc.gsub!(/\./, '\\.\\[')
507507
# tc << '\\]'
508-
#end
508+
#end
509509
if sql =~ /#{Regexp.escape(tc)} AS (t\d_r\d\d?)/
510510
parts[0] = $1
511511
elsif parts[0] =~ /\w+\.\[?(\w+)\]?/
@@ -523,7 +523,7 @@ def add_limit_offset!(sql, options)
523523
end unless options[:limit].nil? || options[:limit] < 1
524524
end
525525
end #add_limit_offset!(sql, options)
526-
526+
527527
def add_order_by_for_association_limiting!(sql, options)
528528
return sql if options[:order].blank?
529529

@@ -561,7 +561,7 @@ def recreate_database(name)
561561
def drop_database(name)
562562
execute "DROP DATABASE #{name}"
563563
end
564-
564+
565565
# Clear the given table and reset the table's id to 1
566566
# Argument:
567567
# +table_name+:: (String) Name of the table to be cleared and reset
@@ -771,7 +771,7 @@ def repair_special_columns(sql)
771771
end
772772
sql
773773
end
774-
774+
775775
def get_utf8_columns(table_name)
776776
utf8 = []
777777
@table_columns ||= []
@@ -781,10 +781,10 @@ def get_utf8_columns(table_name)
781781
end
782782
utf8
783783
end
784-
784+
785785
def set_utf8_values!(sql)
786786
utf8_cols = get_utf8_columns(get_table_name(sql))
787-
if sql =~ /^\s*UPDATE/i
787+
if sql =~ /^\s*UPDATE/i
788788
utf8_cols.each do |col|
789789
sql.gsub!("[#{col.to_s}] = '", "[#{col.to_s}] = N'")
790790
end

0 commit comments

Comments
 (0)