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:
parent
4e0ce3d6a5
commit
685825cdfc
12 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
module BindVisitor
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class Dot < Arel::Visitors::Visitor
|
||||
|
@ -272,7 +273,7 @@ module Arel
|
|||
label = "<f0>#{node.name}"
|
||||
|
||||
node.fields.each_with_index do |field, i|
|
||||
label << "|<f#{i + 1}>#{quote field}"
|
||||
label += "|<f#{i + 1}>#{quote field}"
|
||||
end
|
||||
|
||||
"#{node.id} [label=\"#{label}\"];"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class IBM_DB < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class Informix < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class MSSQL < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class MySQL < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class Oracle < Arel::Visitors::ToSql
|
||||
|
@ -125,7 +126,7 @@ module Arel
|
|||
array[i] << ',' << part
|
||||
else
|
||||
# to ensure that array[i] will be String and not Arel::Nodes::SqlLiteral
|
||||
array[i] = '' << part
|
||||
array[i] = part.to_s
|
||||
end
|
||||
i += 1 if array[i].count('(') == array[i].count(')')
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class Oracle12 < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class PostgreSQL < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class SQLite < Arel::Visitors::ToSql
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'bigdecimal'
|
||||
require 'date'
|
||||
require 'arel/visitors/reduce'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Arel
|
||||
module Visitors
|
||||
class WhereSql < Arel::Visitors::ToSql
|
||||
|
|
Loading…
Reference in a new issue