Class: Piglet::Inout::Load
- Inherits:
-
Object
- Object
- Piglet::Inout::Load
- Includes:
- StorageTypes, Relation::Relation
- Defined in:
- lib/piglet/inout/load.rb
Overview
:nodoc:
Constant Summary
Constants included from StorageTypes
StorageTypes::LOAD_STORE_FUNCTIONS
Instance Attribute Summary
Attributes included from Relation::Relation
Instance Method Summary collapse
-
#initialize(path, options = {}) ⇒ Load
constructor
A new instance of Load.
- #schema ⇒ Object
- #to_s ⇒ Object
Methods included from StorageTypes
Methods included from Relation::Relation
#[], #alias, #cogroup, #cross, #distinct, #eql?, #field, #filter, #foreach, #group, #hash, #join, #limit, #method_missing, #order, #sample, #split, #stream, #union
Constructor Details
#initialize(path, options = {}) ⇒ Load
Returns a new instance of Load.
9 10 11 12 |
# File 'lib/piglet/inout/load.rb', line 9 def initialize(path, ={}) ||= {} @path, @using, @schema = path, [:using], [:schema] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Piglet::Relation::Relation
Instance Method Details
#schema ⇒ Object
14 15 16 |
# File 'lib/piglet/inout/load.rb', line 14 def schema Piglet::Schema::Tuple.parse(@schema) if @schema end |
#to_s ⇒ Object
18 19 20 21 22 23 |
# File 'lib/piglet/inout/load.rb', line 18 def to_s str = "LOAD '#{@path}'" str << " USING #{resolve_load_store_function(@using)}" if @using str << " AS (#{schema_string})" if @schema str end |