Class: PostgresUpsert::TableWriter

Inherits:
Writer
  • Object
show all
Defined in:
lib/postgres_upsert/table_writer.rb

Overview

alternate version of PostgresUpsert::Writer which does not rely on AR table information. We we can use this model to upsert data into views, or tables not associated to rails models

Instance Method Summary collapse

Methods inherited from Writer

#write

Constructor Details

#initialize(table_name, source, options = {}) ⇒ TableWriter

Returns a new instance of TableWriter.



6
7
8
9
# File 'lib/postgres_upsert/table_writer.rb', line 6

def initialize(table_name, source, options = {})
  @table_name = table_name
  super(nil, source, options)
end