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:
Alex Stevenson 2025-07-17 00:44:04 -04:00
parent 3579f47eda
commit d81c397629
7 changed files with 35 additions and 25 deletions

View file

@ -1,16 +1,16 @@
class ActiveSqliteRecord
@mc = nil # MongoConnect instance
@doc = nil # MongoDocument instance....
@id = nil # BSON ID for the Doc
@sqlite_connect = nil # SQLiteConnect instance
@row = nil # SQLite row...
@id = nil # Row ID for the record
def initialize(mc, doc=nil)
@mc = mc
def initialize(sc, table, row=nil)
@sqlite_connect = sc
if doc == nil then
create()
if row == nil then
create(table)
else
@id = doc['_id']
@doc = doc
@id = row['_id']
@row = row
end
end