Class: Sequel::SQL::Constant
- Inherits:
-
GenericExpression
- Object
- Expression
- GenericExpression
- Sequel::SQL::Constant
- Defined in:
- lib/sequel/sql.rb
Overview
Represents constants or psuedo-constants (e.g. CURRENT_DATE
) in SQL.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#constant ⇒ Object
readonly
The underlying constant related to this object.
Instance Method Summary collapse
-
#initialize(constant) ⇒ Constant
constructor
Create an constant with the given value.
Methods included from SubscriptMethods
Methods included from StringMethods
Methods included from OrderMethods
Methods included from ComplexExpressionMethods
#extract, #sql_boolean, #sql_number, #sql_string
Methods included from CastMethods
#cast, #cast_numeric, #cast_string
Methods included from BooleanMethods
Methods included from AliasMethods
Methods inherited from Expression
#==, attr_reader, comparison_attrs, #eql?, #hash, #inspect, #lit, #sql_literal
Constructor Details
#initialize(constant) ⇒ Constant
Create an constant with the given value
677 678 679 |
# File 'lib/sequel/sql.rb', line 677 def initialize(constant) @constant = constant end |
Instance Attribute Details
#constant ⇒ Object (readonly)
The underlying constant related to this object.
674 675 676 |
# File 'lib/sequel/sql.rb', line 674 def constant @constant end |