lua-users home
lua-l archive

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

On May 4, 2011, at 6:39 PM, Henderson, Michael D wrote:

> I'm writing a SQL interface for Oracle and have a question on representing the result sets.

Someone else pointed it out already, but perhaps it's worthwhile repeating:




Both support Oracle to various degree.

If you write your own Oracle interface, one would hope that you will provide a LuaSQL compatible API as a courtesy :)

As far as result set goes, here is the API I personally find convenient [1]:

local aDB = DB( 'sqlite3://localhost/test.db' )

for aContact in aDB( 'select * from contact' ) do
    print(, )

FWIW, bellow is a more fullfledge example, with associated DML: