Module: Veritas::SQL::Generator::Function::Connective
- Includes:
- Veritas::SQL::Generator::Function
- Included in:
- Relation::Unary
- Defined in:
- lib/veritas/sql/generator/function/connective.rb
Overview
Generates an SQL statement for a connective
Constant Summary collapse
- AND =
'AND'.freeze
- OR =
'OR'.freeze
- NOT =
'NOT'.freeze
Constants included from Identifier
Identifier::ESCAPED_QUOTE, Identifier::QUOTE
Constants included from Literal
Literal::ESCAPED_QUOTE, Literal::FALSE, Literal::NULL, Literal::QUOTE, Literal::SEPARATOR, Literal::TIME_SCALE, Literal::TRUE
Instance Method Summary collapse
-
#visit_veritas_function_connective_conjunction(conjunction) ⇒ #to_s
private
Visit an Conjunction connective.
-
#visit_veritas_function_connective_disjunction(disjunction) ⇒ #to_s
private
Visit an Disjunction connective.
-
#visit_veritas_function_connective_negation(negation) ⇒ #to_s
private
Visit an Negation connective.
Methods included from Attribute
Methods included from Identifier
Methods included from Literal
dup_frozen, #visit_class, #visit_date, #visit_date_time, #visit_enumerable, #visit_false_class, #visit_nil_class, #visit_numeric, #visit_string, #visit_time, #visit_true_class
Instance Method Details
#visit_veritas_function_connective_conjunction(conjunction) ⇒ #to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Visit an Conjunction connective
23 24 25 |
# File 'lib/veritas/sql/generator/function/connective.rb', line 23 def visit_veritas_function_connective_conjunction(conjunction) Generator.parenthesize!(binary_infix_operation_sql(AND, conjunction)) end |
#visit_veritas_function_connective_disjunction(disjunction) ⇒ #to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Visit an Disjunction connective
34 35 36 |
# File 'lib/veritas/sql/generator/function/connective.rb', line 34 def visit_veritas_function_connective_disjunction(disjunction) Generator.parenthesize!(binary_infix_operation_sql(OR, disjunction)) end |
#visit_veritas_function_connective_negation(negation) ⇒ #to_s
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Visit an Negation connective
45 46 47 |
# File 'lib/veritas/sql/generator/function/connective.rb', line 45 def visit_veritas_function_connective_negation(negation) unary_prefix_operation_sql(NOT, negation) end |