Method: Irc::DBTree.create_db

Defined in:
lib/rbot/registry/tc.rb,
lib/rbot/registry/bdb.rb

.create_db(name) ⇒ Object



146
147
148
149
150
151
152
# File 'lib/rbot/registry/tc.rb', line 146

def DBTree.create_db(name)
  debug "DBTree: creating empty db #{name}"
  db = TokyoCabinet::CIBDB.new
  res = db.open(name, TokyoCabinet::CIBDB::OREADER | TokyoCabinet::CIBDB::OCREAT | TokyoCabinet::CIBDB::OWRITER)
   warning "DBTree: creating empty db #{name}: #{db.errmsg(db.ecode) unless res}"
  return db
end