Class: Arel::Visitors::SQLite
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
Arel::Visitors::ToSql
|
Defined in: | activerecord/lib/arel/visitors/sqlite.rb |
Constant Summary
ToSql
- Inherited
Class Method Summary
Instance Attribute Summary
Instance Method Summary
-
#infix_value_with_paren(o, collector, value, suppress_parens = false)
private
Queries used in UNION should not be wrapped by parentheses, because it is an invalid syntax in
SQLite
. - #visit_Arel_Nodes_False(o, collector) private
- #visit_Arel_Nodes_IsDistinctFrom(o, collector) private
- #visit_Arel_Nodes_IsNotDistinctFrom(o, collector) private
-
#visit_Arel_Nodes_Lock(o, collector)
private
Locks are not supported in
SQLite
. - #visit_Arel_Nodes_SelectStatement(o, collector) private
- #visit_Arel_Nodes_True(o, collector) private
ToSql
- Inherited
Visitor
- Inherited
Constructor Details
This class inherits a constructor from Arel::Visitors::ToSql
Instance Method Details
#infix_value_with_paren(o, collector, value, suppress_parens = false) (private)
Queries used in UNION should not be wrapped by parentheses, because it is an invalid syntax in SQLite
.
# File 'activerecord/lib/arel/visitors/sqlite.rb', line 39
def infix_value_with_paren(o, collector, value, suppress_parens = false) collector << "( " unless suppress_parens left = o.left.is_a?(Nodes::Grouping) ? o.left.expr : o.left collector = if left.class == o.class infix_value_with_paren(left, collector, value, true) else grouping_parentheses left, collector, false end collector << value right = o.right.is_a?(Nodes::Grouping) ? o.right.expr : o.right collector = if right.class == o.class infix_value_with_paren(right, collector, value, true) else grouping_parentheses right, collector, false end collector << " )" unless suppress_parens collector end
#visit_Arel_Nodes_False(o, collector) (private)
[ GitHub ]# File 'activerecord/lib/arel/visitors/sqlite.rb', line 21
def visit_Arel_Nodes_False(o, collector) collector << "0" end
#visit_Arel_Nodes_IsDistinctFrom(o, collector) (private)
[ GitHub ]# File 'activerecord/lib/arel/visitors/sqlite.rb', line 31
def visit_Arel_Nodes_IsDistinctFrom(o, collector) collector = visit o.left, collector collector << " IS NOT " visit o.right, collector end
#visit_Arel_Nodes_IsNotDistinctFrom(o, collector) (private)
[ GitHub ]# File 'activerecord/lib/arel/visitors/sqlite.rb', line 25
def visit_Arel_Nodes_IsNotDistinctFrom(o, collector) collector = visit o.left, collector collector << " IS " visit o.right, collector end
#visit_Arel_Nodes_Lock(o, collector) (private)
Locks are not supported in SQLite
# File 'activerecord/lib/arel/visitors/sqlite.rb', line 8
def visit_Arel_Nodes_Lock(o, collector) collector end
#visit_Arel_Nodes_SelectStatement(o, collector) (private)
[ GitHub ]#visit_Arel_Nodes_True(o, collector) (private)
[ GitHub ]# File 'activerecord/lib/arel/visitors/sqlite.rb', line 17
def visit_Arel_Nodes_True(o, collector) collector << "1" end