Hopefully getting the database to init and reset itself (in testground.rb, need to make that more of a active_rpg.rb thing...
This commit is contained in:
parent
3579f47eda
commit
d81c397629
7 changed files with 35 additions and 25 deletions
|
|
@ -5,10 +5,15 @@ class SQLiteConnect
|
|||
@db = nil
|
||||
|
||||
def initialize(dbname)
|
||||
@db = SQLite3::Database.open('dbname')
|
||||
@db = SQLite3::Database.new(dbname + ".db")
|
||||
puts @db
|
||||
end
|
||||
|
||||
def execute(query)
|
||||
return @db.execute(query)
|
||||
def query(query)
|
||||
puts "Running query " + query + "..."
|
||||
r = @db.execute(query)
|
||||
puts "response...."
|
||||
puts r.inspect
|
||||
return r
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue