lua-users home
lua-l archive

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


I'm using lsqlite3 from http://luasqlite.luaforge.net/lsqlite3.html
with success; I don't recall any problems compiling it; perhaps it
and/or the sqlite3 libraries are not properly installed on your
system?

I've been very pleased with sqlite3 and it's replaced my use of
MySQL for some "embedded" databases that don't need remote access
over a network connection.  In my use, I have multiple (Lua-based)
applications updating the same sqlite3 database without any problems.
The sqlite3 database handles multiple clients accessing the same
database without any difficulties.

I'm using sqlite3 version 3.5.6 on FreeBSD, along with lsqlite3 as
discussed.

louie


On Aug 3, 2008, at 10:55 AM, A.S. Bradbury wrote:

On Fri, Aug 1, 2008 at 1:14 PM, Graeme <fgpietersz@uk2.net> wrote:
I have a few newbie questions.

Should I be using lua-sqlite3 or lsqlite3 which appears to have been updated more recently? I had problems with lsqlite (compliled with warnings and an
error on require).

I've looked at the various options before and didn't really come to a
conclusion. Currently I use my own minimal binding. I will note
there's also the sqlite3 driver for luasql to consider - perhaps it's
worth also trying the luasql-sqlite3 CVS rockspec.

Can either be configured to allow the dynamic loading of sqlite extensions, or can either be easilly compliled against sqlite with the extensions I want
(FTS and ICU)?

I think the easiest way to compile against sqlite configured as you
want is to download the [amalgamation][1] and compile against that,
changing the Makefile for your lua binding to compile and link against
the local sqlite3.c.

Alternatively, are there any other lightweight databases (i.e. fast, small and zero admin) with lua bindings that I should consider? Metakit, perhaps but
neither it nor lua do non-ascii sorting AFAIK.

There's nothing I'm aware of unless you're content with a simple
key-value store, in which case there are a variety options including
[lgdbm][2] and my own [lua-tinycdb][3] for read-only use. I'll also
point to [LuaVlerq][3] which is from the author of Metakit and looks
interesting, but as the website states "this code is not yet usable,
it is intended to establish a baseline for the new design and to give
an idea of what Vlerq is about." I don't imagine it would be suitable
for your uses.

Regards,

Alex

[1]: http://www.sqlite.org/amalgamation.html
[2]: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lgdbm
[3]: http://asbradbury.org/projects/lua-tinycdb/
[4]: http://vlerq.org/luavlerq.html