lua-users home
lua-l archive

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


This model needs persistence for the database connections, and some more
advanced
tansactional stuff.  Plus some caching of database content would be nice.

If no one is working on such a thing - I have an application which requires
a generalized
database api and connection (with the actual datasource adapter interface
code specifics hidden) in combination with
a new apache mod which allows you to use Lua and the vm as a scripting
engine for HTML.
(Similar to PHP/FI or ColdFusion)

I might consider puting some basics together unelss someone else has a great
deal of work done here.

The database API would be standardized and not be SQL engine specific.  It
would have the ability
to connect to any datasource as long as somebody wrote the underlying
adapter code.

Then all you need is a way to get the database info into the web page -
which the apache mod
could handle.

Jim

-----Original Message-----
From: Erik Hougaard <erik@hougaard.com>
To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
Date: Tuesday, December 15, 1998 10:20 AM
Subject: Re: Lua and databases


>
>
>Roberto Ierusalimschy wrote:
>> The implementation of DBLua (the one made by Mauricio Mediano) is almost
>> that. It has mainly 4 functions:
>>
>> - DBOpen: connect to server
>> - DBExec: executes an SQL statement given as a string
>> - DBRow: retreive "next" row from the result. Each row is retrieved at
once
>> with all columns stored in a Lua table, indexed by the field name.
Returns
>> nil after last row.
>> - DBClose: disconnect from server.
>>
>> -- Roberto
>
>Amen!
>
>SQL Server API's are usually quite simple because they parse the SQL
>statement, the only problem is the whole cursor issuse. If you want to
>create a nice "PC-like" behaving application where you can do
>pageup/pagedown/up/down navigation you can end up doing a lot of server
>queries.. Ohh the day when SQL will get "real" NextRecord/PreviousRecord
>funtions.
>
>Erik