[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua and databases
- From: Roberto Ierusalimschy <roberto@...>
- Date: Tue, 15 Dec 1998 13:09:42 -0100
> (0) Connect to server
> 1. You build a SQL statement in a string
> 2. You submit the statement
> 3. You retreive rows and columns from the result
> (4) Disconnect from server
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