Class: Sum
Instance Attribute Summary
Attributes inherited from Column
Instance Method Summary collapse
- #decl_sql ⇒ Object
-
#initialize(col) ⇒ Sum
constructor
A new instance of Sum.
- #ref_sql ⇒ Object
Methods inherited from Column
Methods inherited from Expr
#*, #+, #<, #<=, #>, #>=, #and, #asc, #desc, #eq, #in, #minus, #ne, #not, #plus
Constructor Details
#initialize(col) ⇒ Sum
Returns a new instance of Sum.
316 317 318 |
# File 'lib/lilit_sql.rb', line 316 def initialize(col) super(nil, col) end |
Instance Method Details
#decl_sql ⇒ Object
324 325 326 |
# File 'lib/lilit_sql.rb', line 324 def decl_sql "sum(#{@origin.ref_sql})" end |
#ref_sql ⇒ Object
320 321 322 |
# File 'lib/lilit_sql.rb', line 320 def ref_sql decl_sql end |