1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Freeze all the strings in visitors

This commit is contained in:
ojab 2016-08-31 15:20:36 +00:00
parent 4e0ce3d6a5
commit 685825cdfc
No known key found for this signature in database
GPG key ID: A3AFEAE93118B22C
12 changed files with 14 additions and 2 deletions

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
module BindVisitor module BindVisitor

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class Dot < Arel::Visitors::Visitor class Dot < Arel::Visitors::Visitor
@ -272,7 +273,7 @@ module Arel
label = "<f0>#{node.name}" label = "<f0>#{node.name}"
node.fields.each_with_index do |field, i| node.fields.each_with_index do |field, i|
label << "|<f#{i + 1}>#{quote field}" label += "|<f#{i + 1}>#{quote field}"
end end
"#{node.id} [label=\"#{label}\"];" "#{node.id} [label=\"#{label}\"];"

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class IBM_DB < Arel::Visitors::ToSql class IBM_DB < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class Informix < Arel::Visitors::ToSql class Informix < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class MSSQL < Arel::Visitors::ToSql class MSSQL < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class MySQL < Arel::Visitors::ToSql class MySQL < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class Oracle < Arel::Visitors::ToSql class Oracle < Arel::Visitors::ToSql
@ -125,7 +126,7 @@ module Arel
array[i] << ',' << part array[i] << ',' << part
else else
# to ensure that array[i] will be String and not Arel::Nodes::SqlLiteral # to ensure that array[i] will be String and not Arel::Nodes::SqlLiteral
array[i] = '' << part array[i] = part.to_s
end end
i += 1 if array[i].count('(') == array[i].count(')') i += 1 if array[i].count('(') == array[i].count(')')
end end

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class Oracle12 < Arel::Visitors::ToSql class Oracle12 < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class PostgreSQL < Arel::Visitors::ToSql class PostgreSQL < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class SQLite < Arel::Visitors::ToSql class SQLite < Arel::Visitors::ToSql

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'bigdecimal' require 'bigdecimal'
require 'date' require 'date'
require 'arel/visitors/reduce' require 'arel/visitors/reduce'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Arel module Arel
module Visitors module Visitors
class WhereSql < Arel::Visitors::ToSql class WhereSql < Arel::Visitors::ToSql