Skip to content

Commit 8e51018

Browse files
author
Landice Fu
committed
support listing database views
1 parent 8dce2d5 commit 8e51018

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

debug-db/src/main/java/com/amitshekhar/utils/DatabaseHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private DatabaseHelper() {
4343

4444
public static Response getAllTableName(SQLiteDatabase database) {
4545
Response response = new Response();
46-
Cursor c = database.rawQuery("SELECT name FROM sqlite_master WHERE type='table'", null);
46+
Cursor c = database.rawQuery("SELECT name FROM sqlite_master WHERE type='table' OR type='view'", null);
4747
if (c.moveToFirst()) {
4848
while (!c.isAfterLast()) {
4949
response.rows.add(c.getString(0));

0 commit comments

Comments
 (0)