Ok this is the actual inital code... need to convert from mongo to sqlite...

This commit is contained in:
Alex Stevenson 2025-07-15 23:00:02 -04:00
parent 8c856ce465
commit 8fa1664bcb
13 changed files with 1168 additions and 0 deletions

23
mongo_connect.rb Normal file
View file

@ -0,0 +1,23 @@
#require 'rubygems' # not necessary for Ruby 1.9
require 'mongo'
Mongo::Logger.logger.level = ::Logger::FATAL
include Mongo
class MongoConnect
def initialize(dbname, collname)
@db = Mongo::Client.new(
["127.0.0.1:27017"],
:database => dbname)
@coll = @db[collname.to_sym]
end
def db()
return @db
end
def collection()
return @coll
end
end