Hello,

[Mac OS X 10.6.4, SQLite 3.7.2, Lua 5.2.0, LuaSQL $Id: ls_sqlite3.c,v 1.15 
2009/02/07 23:16:23 $]

How does one fetch from a pragma such as pragma database_list or table_info?

For example, using sqlite3 directly:

pragma database_list;

> 0|main|Test.db

Using LuaSQL doesn't seem to return much aside from a cursor object:

local aCursor = assert( aConnection:execute( 'pragma database_list' ) )

print( type( aCursor ), aCursor )

> userdata      SQLite3 cursor (0x10011e5f8)

Even though aCursor:getcolnames() returns the proper columns:

> 1     seq
> 2     name
> 3     file

aCursor:getcoltypes() returns an empty table.

And aCursor:fetch( aRow, 'n' ) returns nil:

local aRow, anException = aCursor:fetch( aRow, 'n' )
    
print( type( aRow ), aRow )

> nil   nil

And a, hmmm, strange exception: "database schema has changed"

I must be missing something very obvious, but... I cannot quite see what :)

Any ideas of what I'm doing wrong?

Thanks in advance for any help.

Cheers,

PA.









_______________________________________________
Kepler-Project mailing list
Kepler-Project@lists.luaforge.net
http://lists.luaforge.net/cgi-bin/mailman/listinfo/kepler-project
http://www.keplerproject.org/

Reply via email to