Class: Sequel::SQL::NumericExpression
- Inherits:
-
ComplexExpression
- Object
- Expression
- ComplexExpression
- Sequel::SQL::NumericExpression
- Includes:
- BitwiseMethods, InequalityMethods, NumericMethods
- Defined in:
- lib/sequel/sql.rb
Overview
Subclass of ComplexExpression
where the expression results in a numeric value in SQL.
Constant Summary
Constants inherited from ComplexExpression
ComplexExpression::BITWISE_OPERATORS, ComplexExpression::BOOLEAN_OPERATOR_METHODS, ComplexExpression::CONSTANT_INVERSIONS, ComplexExpression::CUSTOM_EXPRESSIONS, ComplexExpression::EQUALITY_OPERATORS, ComplexExpression::INEQUALITY_OPERATORS, ComplexExpression::IN_OPERATORS, ComplexExpression::IS_OPERATORS, ComplexExpression::LIKE_OPERATORS, ComplexExpression::MATHEMATICAL_OPERATORS, ComplexExpression::N_ARITY_OPERATORS, ComplexExpression::ONE_ARITY_OPERATORS, ComplexExpression::OPERTATOR_INVERSIONS, ComplexExpression::REGEXP_OPERATORS, ComplexExpression::TWO_ARITY_OPERATORS
Instance Attribute Summary
Attributes inherited from ComplexExpression
Instance Method Summary collapse
-
#+(ce) ⇒ Object
Always use + for + operator for NumericExpressions.
-
#sql_number ⇒ Object
Return self instead of creating a new object to save on memory.
Methods included from NumericMethods
Methods included from BitwiseMethods
Methods inherited from ComplexExpression
#initialize, #sql_boolean, #sql_string
Methods included from SubscriptMethods
Methods included from PatternMatchMethods
Methods included from OrderMethods
Methods included from CastMethods
#cast, #cast_numeric, #cast_string
Methods included from AliasMethods
Methods inherited from Expression
#==, attr_reader, #eql?, #hash, inherited, #inspect, #lit, #sql_literal
Constructor Details
This class inherits a constructor from Sequel::SQL::ComplexExpression
Instance Method Details
#+(ce) ⇒ Object
Always use + for + operator for NumericExpressions.
1573 1574 1575 |
# File 'lib/sequel/sql.rb', line 1573 def +(ce) NumericExpression.new(:+, self, ce) end |
#sql_number ⇒ Object
Return self instead of creating a new object to save on memory.
1578 1579 1580 |
# File 'lib/sequel/sql.rb', line 1578 def sql_number self end |