I came across various similar questions, but I can't figure it out.
how to I use the .import command from ruby? I mean, when you run the sqlite3, you can type in commands, like this:
sqlite3> .import file table
so, how can i import file this way into sqlite3 in-memory database and performing sql on it?
my "not-so-pseudocode" (which not work):
require 'sqlite3'
begin
db = SQLite3::Database.new ":memory:"
db.execute ".import file table" #<----- not working, obviously
rescue SQLite3::Exception => e
puts "Exception occurred"
puts e
ensure
db.close if db
end