Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

sqlite pragma commands

The following returns null, but should be a valid sqlite command.

var rows = db.execute("pragma table_info(clients)");

is it not possible to get information using the pragma statement.

I am trying to get a list of column names from my table. I suppose i could interrogate the rows object to find this. Haven't tried that yet.

— asked May 11th 2010 by Jeremy Diviney
  • column names
  • mobile
  • pragma
  • sql
  • sqlite
0 Comments

2 Answers

  • I don't know why pragmas are not supported, but you can obtain the same information by reading the sqlite_master table (albeit with some difficulty)

    — answered May 12th 2010 by Damien Elmes
    permalink
    0 Comments
  • I just tried some pragma commands in 1.3.4 and they worked find.

    var rows = db.execute('PRAGMA database_list');

    I didn't not try table_info() though

    — answered August 3rd 2010 by Curtis Olson
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.