Class: Piglet::Relation::Limit
- Inherits:
-
Object
- Object
- Piglet::Relation::Limit
- Includes:
- Relation
- Defined in:
- lib/piglet/relation/limit.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes included from Relation
Instance Method Summary collapse
-
#initialize(relation, interpreter, n) ⇒ Limit
constructor
A new instance of Limit.
- #to_s ⇒ Object
Methods included from Relation
#[], #alias, #cogroup, #cross, #distinct, #eql?, #field, #filter, #foreach, #group, #hash, #join, #limit, #method_missing, #nested_foreach, #next_field_alias, #order, #sample, #schema, #split, #stream, #union
Constructor Details
#initialize(relation, interpreter, n) ⇒ Limit
Returns a new instance of Limit.
8 9 10 |
# File 'lib/piglet/relation/limit.rb', line 8 def initialize(relation, interpreter, n) @sources, @interpreter, @n = [relation], interpreter, n end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Piglet::Relation::Relation
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/piglet/relation/limit.rb', line 12 def to_s "LIMIT #{@sources.first.alias} #{@n}" end |