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

Method read

app/src/main/java/androidx/room/ViewInfo.java:82–96  ·  view source on GitHub ↗

Reads the view information from the given database. @param database The database to read the information from. @param viewName The view name. @return A ViewInfo containing the schema information for the provided view name.

(SupportSQLiteDatabase database, String viewName)

Source from the content-addressed store, hash-verified

80 * @return A ViewInfo containing the schema information for the provided view name.
81 */
82 @SuppressWarnings("SameParameterValue")
83 public static ViewInfo read(SupportSQLiteDatabase database, String viewName) {
84 Cursor cursor = database.query("SELECT name, sql FROM sqlite_master "
85 + "WHERE type = 'view' AND name = '" + viewName + "'");
86 //noinspection TryFinallyCanBeTryWithResources
87 try {
88 if (cursor.moveToFirst()) {
89 return new ViewInfo(cursor.getString(0), cursor.getString(1));
90 } else {
91 return new ViewInfo(viewName, null);
92 }
93 } finally {
94 cursor.close();
95 }
96 }
97}

Callers 5

runMethod · 0.45
uploadMethod · 0.45
copyMethod · 0.45
readVersionMethod · 0.45
ReadMethod · 0.45

Calls 4

moveToFirstMethod · 0.80
queryMethod · 0.45
getStringMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected