Skip to content

Instantly share code, notes, and snippets.

@oroce
Created July 21, 2011 14:53
Show Gist options
  • Save oroce/1097358 to your computer and use it in GitHub Desktop.
Save oroce/1097358 to your computer and use it in GitHub Desktop.
listing tables in appcelerator app
var db = Ti.Database.install( "../db/imenetrend_new.sqlite", "main" ),
_rows = db.execute( "select * from sqlite_master" );
while( _rows.isValidRow() ){
Ti.API.info( "TableName: " + _rows.fieldByName( "name" ) + " - " + _rows.fieldByName( "tbl_name" ) + " - " + _rows.fieldByName( "sql" ) );
_rows.next();
}
/*
it shows:
TableName: android_metadata - android_metadata - CREATE TABLE android_metadata (locale TEXT)
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment