Class: DB::Model::Statement::Count
- Inherits:
-
Object
- Object
- DB::Model::Statement::Count
- Defined in:
- lib/db/model/statement/count.rb
Constant Summary collapse
Instance Method Summary collapse
- #append_to(statement) ⇒ Object
-
#initialize(expression) ⇒ Count
constructor
A new instance of Count.
Constructor Details
#initialize(expression) ⇒ Count
Returns a new instance of Count.
12 13 14 |
# File 'lib/db/model/statement/count.rb', line 12 def initialize(expression) @expression = expression end |
Instance Method Details
#append_to(statement) ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/db/model/statement/count.rb', line 16 def append_to(statement) statement.clause("COUNT(") @expression.append_to(statement) statement.clause(")") end |