[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Dado 1.0
- From: Mike Schmitz <mschmitz@...>
- Date: Thu, 01 May 2008 14:26:18 -0700
Tomas Guisasola Gorham wrote:
Hi Mike
Dado is just a library over LuaSQL. The select iterator
creates a cursor (using LuaSQL's execute) and builds a function which
calls its `fetch' method. Thus, it could let the cursor open.
However, for just 2 selects it should not be a problem don't you
think? Can you send me a sample code?
Regards,
Tomás
require("luarocks.require")
dado = require("dado")
db = dado.connect("db_name","db_user","db_pass","odbc")
for t1 in db:select("*","table1_name",nil,nil,"a") do
print(t1.column1, t1.column2)
end
for t2 in db:select("*","table2_name",nil,nil,"a") do
print(t2.column1, t2.column2)
end
for t3 in db:select("*","table3_name",nil,nil,"a") do
print(t3.column1, t3.column2)
end
for t4 in db:select("*","table4_name",nil,nil,"a") do
print(t4.column1, t4.column2)
end
t1 and t3 work fine, t2 and t4 fail.