class JunglePath::DBAccess::Import::Schema

Public Class Methods

new(config, logger=nil) click to toggle source
# File lib/jungle_path/db_access/import/schema.rb, line 9
def initialize(config, logger=nil)
        @logger = logger
        @path = config.import_file_path
        #@db = nil
        #if config.postgresql
        #  @db = JunglePath::DBAccess::IO::DB.new(config.postgresql, @logger)
        #end
end

Public Instance Methods

create_table(table_class) click to toggle source
# File lib/jungle_path/db_access/import/schema.rb, line 26
def create_table(table_class)
        raise 'create_table method not implemented'
        #if @db
        #  @db.schema.create_table(table_class)
        #end
end
drop_table(table_class) click to toggle source
# File lib/jungle_path/db_access/import/schema.rb, line 18
def drop_table(table_class)
        file_name = JunglePath::DBAccess::Import.data_file_name(@path, table_class.table_name)
        File.delete file_name if File.exist?(file_name)
        #if @db
        #  @db.schema.drop_table(table_class)
        #end
end