Monday, July 26, 2004, 5:46:48 PM, Nuno Lucas wrote: > Doug Currie, dando pulos de alegria, escreveu : >> In 3.x column names are available as soon as the query is prepared. >> See the C API reference at >> http://www.sqlite.org/capi3ref.html#sqlite3_column_name
> This wasn't implemented in 3.0.2, right? (I didn't test 3.0.3 yet) > I believe I tried that (exactly because I understood that from the docs) > but found it didn't work for empty tables. Please try it again; I just tried it with an sqlite3 I built on June 24, and it is working... Lua 5.0.2 Copyright (C) 1994-2004 Tecgraf, PUC-Rio > require"sqlite3" > db=sqlite.open"foo.db" > db:exec"create table baz (a,b,c);" > vm=db:compile"select * from baz;" > t=vm:get_names() > for i,n in pairs( t) do print (i,n) end 1 a 2 b 3 c n 3 e