Class: Cyrel::AST::LoadCsvNode

Inherits:
ClauseNode show all
Defined in:
lib/cyrel/ast/load_csv_node.rb

Overview

AST node for LOAD CSV clause (extension) For when you need to import data from the ancient format of CSV

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept

Constructor Details

#initialize(url, variable, with_headers: false, fieldterminator: nil) ⇒ LoadCsvNode

Returns a new instance of LoadCsvNode.



10
11
12
13
14
15
# File 'lib/cyrel/ast/load_csv_node.rb', line 10

def initialize(url, variable, with_headers: false, fieldterminator: nil)
  @url = url
  @variable = variable
  @with_headers = with_headers
  @fieldterminator = fieldterminator
end

Instance Attribute Details

#fieldterminatorObject (readonly)

Returns the value of attribute fieldterminator.



8
9
10
# File 'lib/cyrel/ast/load_csv_node.rb', line 8

def fieldterminator
  @fieldterminator
end

#urlObject (readonly)

Returns the value of attribute url.



8
9
10
# File 'lib/cyrel/ast/load_csv_node.rb', line 8

def url
  @url
end

#variableObject (readonly)

Returns the value of attribute variable.



8
9
10
# File 'lib/cyrel/ast/load_csv_node.rb', line 8

def variable
  @variable
end

#with_headersObject (readonly)

Returns the value of attribute with_headers.



8
9
10
# File 'lib/cyrel/ast/load_csv_node.rb', line 8

def with_headers
  @with_headers
end