Class: TableSaw::Formats::Insert

Inherits:
Base
  • Object
show all
Defined in:
lib/table_saw/formats/insert.rb

Instance Attribute Summary

Attributes inherited from Base

#options, #table_name

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from TableSaw::Formats::Base

Instance Method Details

#coderObject



18
19
20
# File 'lib/table_saw/formats/insert.rb', line 18

def coder
  PG::TextDecoder::CopyRow.new
end

#dump_row(row) ⇒ Object



14
15
16
# File 'lib/table_saw/formats/insert.rb', line 14

def dump_row(row)
  TableSaw::Queries::ExecuteInsertStatement.new(prepared_statement, row).call
end


10
11
12
# File 'lib/table_saw/formats/insert.rb', line 10

def footer
  "\n"
end

#headerObject



6
7
8
# File 'lib/table_saw/formats/insert.rb', line 6

def header
  prepared_statement.sql
end