lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 03.11.04 Taj Khattra pressed the following keys:

> i've updated luacdb for lua-5.0.  below is a portion of its README:
> 
> luacdb is a Lua interface to Dan Bernstein's cdb, modeled closely on
> Luiz Henrique de Figueiredo's gdbm interface.  luacdb provides Lua
> interfaces for both creating and reading cdb's.

Hmm... Perheaps it is time to implement some common framework for simple
databases that would unify access to them from lua?

AFAIR there are already gdbm, bdb and cdb, all implemented
independently, and all sharing similar characteristics and providing
more or less the same functionality.

It wouldn't hurt if the framework contained some helper methods
that would allow to easily use such disk based DB as backend for
table/hash constructs in lua. Something like:

db = AnyDB.new{type="cdb",file="somefile"}
db.key = value
print (db["rrw"])
db:flush()

etc

Robert

-- 
Robert R. Wal               Bastard Operator From 149.156.96.35
mail/jabber/wpkontakt/msn: rrw@hell.pl gg: 2785415 icq: 8853661