Sha256: bd9d596940e7eb031689d95affba18836595f51bb7501f6cb8912f42da4fb35d
Contents?: true
Size: 625 Bytes
Versions: 2
Compression:
Stored size: 625 Bytes
Contents
module ActiveRecord class Base # Copy data to a file passed as a string (the file path) or to lines that are passed to a block # Copy data from a CSV that can be passed as a string (the file path) or as an IO object. # * You can change the default delimiter passing delimiter: '' in the options hash # * You can map fields from the file to different fields in the table using a map in the options hash # * For further details on usage take a look at the README.md def self.pg_upsert path_or_io, options = {} PostgresUpsert::Writer.new(table_name, path_or_io, options).write end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
postgres_upsert-3.1.0-java | lib/postgres_upsert/active_record.rb |
postgres_upsert-3.0.0 | lib/postgres_upsert/active_record.rb |