(SupportSQLiteDatabase database, String tableName)
| 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. |
no test coverage detected