Ruby 从 Berkeley DB 数据库保存和获取数据

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

require 'bdb'

db = BDB::Hash.create('r2.db', nil, BDB::CREATE)
db['W'] = 'i'
db.close

db = BDB::Hash.open('r2.db', nil, 'r')
db['W']
db.close