public static Set<String> getAllTableNames(SQLDatabase db) throws SQLException { Cursor cursor = null; try { cursor = db.rawQuery("SELECT name FROM sqlite_master WHERE type='table'", new String[] {}); Set<String> tables = new HashSet<String>(); while (cursor.moveToNext()) { tables.add(cursor.getString(0)); } return tables; } finally { } }
public static Set<String> getCompileOptions(SQLDatabase db) throws SQLException { Cursor cursor = null; Set<String> compileOptions = new HashSet<String>(); try { cursor = db.rawQuery("PRAGMA compile_options", new String[] {}); while (cursor.moveToNext()) { compileOptions.add(cursor.getString(0)); } } finally { if (cursor != null) { cursor.close(); } } return compileOptions; }