Sha256: 590cfea413ee891c36a72f0a43d409a1722a74289f967734f981429dd1b9ee7b
Contents?: true
Size: 486 Bytes
Versions: 11
Compression:
Stored size: 486 Bytes
Contents
module RailsDb class SqlImport include Connection attr_reader :time, :result def initialize(file) @file = file end def valid? if @file.nil? raise RailsDbError.new('Please select valid SQL file and continue') end end def import valid? @time = Database.adapter.execute(@file.read) @result = Result.ok rescue RailsDbError, ActiveRecord::StatementInvalid => e @result = Result.new(e) end end end
Version data entries
11 entries across 11 versions & 1 rubygems