Class | Amalgalite::CSVTableImporter
In: | lib/amalgalite/csv_table_importer.rb lib/amalgalite/csv_table_importer.rb
Parent: | Object

A class to deal with importing CSV data into a single table in the database.

### Methods

column_names column_names insert_column_list insert_column_list insert_sql insert_sql new new run run table_list table_list validate validate

### Public Class methods

new( csv_path, database, table_name, options = {} )
new( csv_path, database, table_name, options = {} )

### Public Instance methods

column_names()

The column names of the import table in definiation order

column_names()

The column names of the import table in definiation order

insert_column_list()

The columns used for the insertion. This is either column_names or the value out of @options[:headers] if that value is an Array

insert_column_list()

The columns used for the insertion. This is either column_names or the value out of @options[:headers] if that value is an Array

insert_sql()

The prepared statement SQL that is used for the import

insert_sql()

The prepared statement SQL that is used for the import

run()
run()
table_list()
table_list()
validate()

validate that the arguments for initialization are valid and that the run method will probably execute

validate()

validate that the arguments for initialization are valid and that the run method will probably execute

[Validate]