MCPcopy Create free account
hub / github.com/M66B/FairEmail / readOptions

Method readOptions

app/src/main/java/androidx/room/FtsTableInfo.java:103–116  ·  view source on GitHub ↗
(SupportSQLiteDatabase database, String tableName)

Source from the content-addressed store, hash-verified

101 }
102
103 @SuppressWarnings("TryFinallyCanBeTryWithResources")
104 private static Set<String> readOptions(SupportSQLiteDatabase database, String tableName) {
105 String sql = "";
106 Cursor cursor = database.query(
107 "SELECT * FROM sqlite_master WHERE `name` = '" + tableName + "'");
108 try {
109 if (cursor.moveToFirst()) {
110 sql = cursor.getString(cursor.getColumnIndexOrThrow("sql"));
111 }
112 } finally {
113 cursor.close();
114 }
115 return parseOptions(sql);
116 }
117
118 /**
119 * Parses FTS options from the create statement of an FTS table.

Callers 1

readMethod · 0.95

Calls 6

parseOptionsMethod · 0.95
moveToFirstMethod · 0.80
queryMethod · 0.45
getStringMethod · 0.45
getColumnIndexOrThrowMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected