/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/measurement/migration/ |
D | MigrationHelpers.java | 39 SQLiteDatabase db, String tableName, String backupTableName, String createTableQuery) { in copyAndUpdateTable() argument 41 db, tableName, backupTableName, createTableQuery, null); in copyAndUpdateTable() 48 static void copyAndUpdateTable(SQLiteDatabase db, String tableName, String backupTableName, in copyAndUpdateTable() argument 50 if (!isTablePresent(db, tableName)) { in copyAndUpdateTable() 54 String.format("ALTER TABLE %1$s RENAME TO %2$s", tableName, backupTableName); in copyAndUpdateTable() 63 List<String> newTableColumnNames = getTableColumnNames(db, tableName); in copyAndUpdateTable() 85 tableName, columnsStr, backupTableName); in copyAndUpdateTable() 93 static void addIntColumnsIfAbsent(SQLiteDatabase db, String tableName, String[] columnNames) { in addIntColumnsIfAbsent() argument 95 addIntColumnIfAbsent(db, tableName, column); in addIntColumnsIfAbsent() 101 SQLiteDatabase db, String tableName, String columnName) { in addIntColumnIfAbsent() argument [all …]
|
/packages/modules/HealthFitness/tests/cts/hostsidetests/healthconnect/host/src/android/healthconnect/cts/database/ |
D | DatabaseTestUtils.java | 212 for (String tableName : mTableListPreviousVersion.keySet()) { in checkExistingTableDeletion() 214 if (!mTableListCurrentVersion.containsKey(tableName)) { in checkExistingTableDeletion() 215 deletionOfTable.add("Table: " + tableName + " has been deleted from the database"); in checkExistingTableDeletion() 229 for (String tableName : mTableListPreviousVersion.keySet()) { in checkPrimaryKeyModification() 231 if (mTableListCurrentVersion.containsKey(tableName)) { in checkPrimaryKeyModification() 234 mTableListPreviousVersion.get(tableName).getPrimaryKey(); in checkPrimaryKeyModification() 236 mTableListCurrentVersion.get(tableName).getPrimaryKey(); in checkPrimaryKeyModification() 244 + tableName); in checkPrimaryKeyModification() 254 + tableName); in checkPrimaryKeyModification() 270 for (String tableName : mTableListPreviousVersion.keySet()) { in checkColumnModification() [all …]
|
D | IndexInfo.java | 48 Builder(String indexName, String tableName) { in Builder() argument 50 mTableName = tableName; in Builder() 130 IndexInfo expectedIndex, List<String> modificationOfIndex, String tableName) { in checkIndexDiff() argument 140 + tableName); in checkIndexDiff() 152 + tableName); in checkIndexDiff() 162 + tableName); in checkIndexDiff() 168 + tableName); in checkIndexDiff()
|
D | ColumnInfo.java | 166 ColumnInfo expectedColumn, List<String> modificationOfColumn, String tableName) { in checkColumnDiff() argument 173 + tableName); in checkColumnDiff() 180 + tableName); in checkColumnDiff() 190 + tableName); in checkColumnDiff() 201 + tableName); in checkColumnDiff()
|
D | ForeignKeyInfo.java | 158 String tableName) { in checkForeignKeyDiff() argument 165 + tableName); in checkForeignKeyDiff() 172 + tableName); in checkForeignKeyDiff() 184 + tableName); in checkForeignKeyDiff()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/shared/migration/ |
D | MigrationHelpers.java | 26 static void addIntColumnsIfAbsent(SQLiteDatabase db, String tableName, String[] columnNames) { in addIntColumnsIfAbsent() argument 28 addIntColumnIfAbsent(db, tableName, column); in addIntColumnsIfAbsent() 34 SQLiteDatabase db, String tableName, String columnName) { in addIntColumnIfAbsent() argument 35 if (isColumnPresent(db, tableName, columnName)) { in addIntColumnIfAbsent() 38 db.execSQL(String.format("ALTER TABLE %1$s ADD %2$s INTEGER", tableName, columnName)); in addIntColumnIfAbsent() 42 static void addTextColumnsIfAbsent(SQLiteDatabase db, String tableName, String[] columnNames) { in addTextColumnsIfAbsent() argument 44 addTextColumnIfAbsent(db, tableName, column); in addTextColumnsIfAbsent() 50 SQLiteDatabase db, String tableName, String columnName) { in addTextColumnIfAbsent() argument 51 if (isColumnPresent(db, tableName, columnName)) { in addTextColumnIfAbsent() 54 db.execSQL(String.format("ALTER TABLE %1$s ADD %2$s TEXT", tableName, columnName)); in addTextColumnIfAbsent() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/data/ |
D | DbTestUtil.java | 50 public static void deleteTable(String tableName) { in deleteTable() argument 56 db.delete(tableName, /* whereClause= */ null, /* whereArgs= */ null); in deleteTable() 95 SQLiteDatabase db, String tableName, int columnCount) { in doesTableExistAndColumnCountMatch() argument 96 final Set<String> tableColumns = getTableColumns(db, tableName); in doesTableExistAndColumnCountMatch() 98 Log.d("DbTestUtil_log_test,", " table name: " + tableName + " column count: " + actualCol); in doesTableExistAndColumnCountMatch() 103 public static Set<String> getTableColumns(SQLiteDatabase db, String tableName) { in getTableColumns() argument 108 + tableName in getTableColumns() 164 for (String tableName : tableNames) { in assertTableSchemaEqual() 166 expectedDb.rawQuery("PRAGMA TABLE_INFO(" + tableName + ")", null); in assertTableSchemaEqual() 168 actualDb.rawQuery("PRAGMA TABLE_INFO(" + tableName + ")", null); in assertTableSchemaEqual() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/ |
D | DbTestUtil.java | 51 public static void deleteTable(String tableName) { in deleteTable() argument 57 db.delete(tableName, /* whereClause= */ null, /* whereArgs= */ null); in deleteTable() 105 SQLiteDatabase db, String tableName, int columnCount) { in doesTableExistAndColumnCountMatch() argument 106 final Set<String> tableColumns = getTableColumns(db, tableName); in doesTableExistAndColumnCountMatch() 108 Log.d("DbTestUtil_log_test,", " table name: " + tableName + " column count: " + actualCol); in doesTableExistAndColumnCountMatch() 113 public static Set<String> getTableColumns(SQLiteDatabase db, String tableName) { in getTableColumns() argument 118 + tableName in getTableColumns() 173 for (String tableName : tableNames) { in assertTableSchemaEqual() 175 expectedDb.rawQuery("PRAGMA TABLE_INFO(" + tableName + ")", null); in assertTableSchemaEqual() 177 actualDb.rawQuery("PRAGMA TABLE_INFO(" + tableName + ")", null); in assertTableSchemaEqual() [all …]
|
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/gridmigration/ |
D | ValidGridMigrationUnitTest.kt | 43 private data class Grid(val tableName: String, val size: Point, val items: List<WorkspaceItem>) { in <lambda>() constant in com.android.launcher3.model.gridmigration.Grid 45 DeviceGridState(size.x, size.y, size.x, InvariantDeviceProfile.TYPE_PHONE, tableName) in <lambda>() 106 grid.items.forEach { insertIntoDb(grid.tableName, it, transaction.db) } in addItemsToDb() 124 Favorites.addTableToDb(dbHelper.writableDatabase, userSerial, false, srcGrid.tableName) in migrate() 132 GridSizeMigrationUtil.DbReader(it.db, srcGrid.tableName, context, MockSet(1)), in migrate() 133 GridSizeMigrationUtil.DbReader(it.db, dstGrid.tableName, context, MockSet(1)), in migrate() 141 return readDb(dstGrid.tableName, dbHelper.readableDatabase) in migrate() 152 tableName = Favorites.TMP_TABLE, in runTestCase() 157 Grid(tableName = Favorites.TABLE_NAME, size = testCase.targetSize, items = listOf()) in runTestCase() 170 tableName = Favorites.TMP_TABLE, in mergeBoards() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/system-service/src/com/android/server/adservices/data/topics/ |
D | TopicsDbTestUtil.java | 40 public static void deleteTable(String tableName) { in deleteTable() argument 46 db.delete(tableName, /* whereClause= */ null, /* whereArgs= */ null); in deleteTable() 69 SQLiteDatabase db, String tableName, int columnCount) { in doesTableExistAndColumnCountMatch() argument 70 final Set<String> tableColumns = getTableColumns(db, tableName); in doesTableExistAndColumnCountMatch() 72 LogUtil.d("DbTestUtil_log_test: table name: %s, column count: %d", tableName, actualCol); in doesTableExistAndColumnCountMatch() 77 public static Set<String> getTableColumns(SQLiteDatabase db, String tableName) { in getTableColumns() argument 82 + tableName in getTableColumns()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/adselection/ |
D | AdSelectionDatabaseMigrationTest.java | 172 tableName -> { in validateTablesExistsInDatabase() 173 validateTableExistsInDatabase(db, tableName); in validateTablesExistsInDatabase() 177 private void validateTableExistsInDatabase(SupportSQLiteDatabase db, String tableName) { in validateTableExistsInDatabase() argument 178 Cursor cursor = db.query(String.format(QUERY_TABLES_FROM_SQL_MASTER, tableName)); in validateTableExistsInDatabase() 181 assertEquals(tableName, cursor.getString(cursor.getColumnIndex(COLUMN_NAME_NAME))); in validateTableExistsInDatabase() 187 tableName -> { in validateTablesDoNotExistInDatabase() 188 validateTableDoesNotExistsInDatabase(db, tableName); in validateTablesDoNotExistInDatabase() 192 private void validateTableDoesNotExistsInDatabase(SupportSQLiteDatabase db, String tableName) { in validateTableDoesNotExistsInDatabase() argument 193 Cursor cursor = db.query(String.format(QUERY_TABLES_FROM_SQL_MASTER, tableName)); in validateTableDoesNotExistsInDatabase()
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | GridBackupTable.java | 45 public void createCustomBackupTable(String tableName) { in createCustomBackupTable() argument 48 copyTable(mDb, Favorites.TABLE_NAME, tableName, profileId); in createCustomBackupTable() 56 public void restoreFromCustomBackupTable(String tableName, boolean dropAfterUse) { in restoreFromCustomBackupTable() argument 57 if (!tableExists(mDb, tableName)) { in restoreFromCustomBackupTable() 62 copyTable(mDb, tableName, Favorites.TABLE_NAME, userSerial); in restoreFromCustomBackupTable() 64 dropTable(mDb, tableName); in restoreFromCustomBackupTable()
|
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/data/vendor/ |
D | OnDevicePersonalizationLocalDataDao.java | 81 String tableName = getTableName(owner, certDigest); in getInstance() local 82 String fileDir = getFileDir(tableName, context.getFilesDir()); in getInstance() 83 OnDevicePersonalizationLocalDataDao instance = sLocalDataDaos.get(tableName); in getInstance() 86 instance = sLocalDataDaos.get(tableName); in getInstance() 92 sLocalDataDaos.put(tableName, instance); in getInstance() 107 String tableName = getTableName(owner, certDigest); in getInstanceForTest() local 108 String fileDir = getFileDir(tableName, context.getFilesDir()); in getInstanceForTest() 109 OnDevicePersonalizationLocalDataDao instance = sLocalDataDaos.get(tableName); in getInstanceForTest() 115 sLocalDataDaos.put(tableName, instance); in getInstanceForTest() 124 public static String getFileDir(String tableName, File baseDir) { in getFileDir() argument [all …]
|
D | OnDevicePersonalizationVendorDataDao.java | 91 String tableName = getTableName(owner, certDigest); in getInstance() local 92 String fileDir = getFileDir(tableName, context.getFilesDir()); in getInstance() 93 OnDevicePersonalizationVendorDataDao instance = sVendorDataDaos.get(tableName); in getInstance() 96 instance = sVendorDataDaos.get(tableName); in getInstance() 104 sVendorDataDaos.put(tableName, instance); in getInstance() 119 String tableName = getTableName(owner, certDigest); in getInstanceForTest() local 120 String fileDir = getFileDir(tableName, context.getFilesDir()); in getInstanceForTest() 121 OnDevicePersonalizationVendorDataDao instance = sVendorDataDaos.get(tableName); in getInstanceForTest() 129 sVendorDataDaos.put(tableName, instance); in getInstanceForTest() 145 public static String getFileDir(String tableName, File baseDir) { in getFileDir() argument [all …]
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | TvPermissionTest.java | 46 public void verifyInsert(Uri uri, String tableName) throws Exception { in verifyInsert() argument 50 fail("Accessing " + tableName + " table should require WRITE_EPG_DATA permission."); in verifyInsert() 58 public void verifyUpdate(Uri uri, String tableName) throws Exception { in verifyUpdate() argument 62 fail("Accessing " + tableName + " table should require WRITE_EPG_DATA permission."); in verifyUpdate() 70 public void verifyDelete(Uri uri, String tableName) throws Exception { in verifyDelete() argument 73 fail("Accessing " + tableName + " table should require WRITE_EPG_DATA permission."); in verifyDelete()
|
/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | EntrySchema.java | 296 String tableName = mTableName; in createTables() local 297 Utils.assertTrue(tableName != null); in createTables() 301 sql.append(tableName); in createTables() 335 sql.append(tableName); in createTables() 339 sql.append(tableName); in createTables() 350 String ftsTableName = tableName + FULL_TEXT_INDEX_SUFFIX; in createTables() 390 sql.append(tableName); in createTables() 392 sql.append(tableName); in createTables() 401 sql.append(tableName); in createTables() 403 sql.append(tableName); in createTables() [all …]
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | HbpcdLookupDatabaseHelper.java | 175 String tableName = parser.getAttributeValue(null, "name"); in initDatabase() local 176 loadTable(db, parser, tableName); in initDatabase() 196 private void loadTable(SQLiteDatabase db, XmlPullParser parser, String tableName) in loadTable() argument 203 if (tableName.equalsIgnoreCase(HbpcdLookupProvider.TABLE_MCC_IDD)) { in loadTable() 205 } else if (tableName.equalsIgnoreCase(HbpcdLookupProvider.TABLE_MCC_LOOKUP_TABLE)) { in loadTable() 207 } else if (tableName.equalsIgnoreCase(HbpcdLookupProvider.TABLE_MCC_SID_CONFLICT)) { in loadTable() 209 } else if (tableName.equalsIgnoreCase(HbpcdLookupProvider.TABLE_MCC_SID_RANGE)) { in loadTable() 211 } else if (tableName.equalsIgnoreCase(HbpcdLookupProvider.TABLE_NANP_AREA_CODE)) { in loadTable() 213 } else if (tableName.equalsIgnoreCase( in loadTable() 217 Log.e(TAG, "unrecognized table name" + tableName); in loadTable() [all …]
|
/packages/apps/TV/src/com/android/tv/dvr/provider/ |
D | DvrDatabaseHelper.java | 195 private static String buildCreateSchedulesSql(String tableName, ColumnInfo[] columns) { in buildCreateSchedulesSql() argument 197 tableName, in buildCreateSchedulesSql() 206 String tableName, in buildCreateSql() argument 210 sb.append("CREATE TABLE ").append(tableName).append("("); in buildCreateSql() 250 private static String buildInsertSql(String tableName, ColumnInfo[] columns) { in buildInsertSql() argument 252 sb.append("INSERT INTO ").append(tableName).append(" ("); in buildInsertSql() 269 private static String buildUpdateSql(String tableName, ColumnInfo[] columns) { in buildUpdateSql() argument 271 sb.append("UPDATE ").append(tableName).append(" SET "); in buildUpdateSql() 284 private static String buildDeleteSql(String tableName) { in buildDeleteSql() argument 285 return "DELETE FROM " + tableName + " WHERE " + BaseColumns._ID + "=?"; in buildDeleteSql() [all …]
|
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/storage/request/ |
D | DeleteTableRequest.java | 65 @NonNull String tableName, @RecordTypeIdentifier.RecordType int recordType) { in DeleteTableRequest() 66 Objects.requireNonNull(tableName); in DeleteTableRequest() 68 mTableName = tableName; in DeleteTableRequest() 73 public DeleteTableRequest(@NonNull String tableName) { in DeleteTableRequest() argument 74 Objects.requireNonNull(tableName); in DeleteTableRequest() 76 mTableName = tableName; in DeleteTableRequest()
|
D | AlterTableRequest.java | 41 public AlterTableRequest(String tableName, List<Pair<String, String>> columnInfo) { in AlterTableRequest() argument 42 mTableName = tableName; in AlterTableRequest() 83 String tableName, CreateTableRequest.GeneratedColumnInfo generatedColumnInfo) { in getAlterTableCommandToAddGeneratedColumn() argument 86 + tableName in getAlterTableCommandToAddGeneratedColumn()
|
D | AggregateParams.java | 54 public AggregateParams(String tableName, List<String> columnsToFetch) { in AggregateParams() argument 55 this(tableName, columnsToFetch, null); in AggregateParams() 60 String tableName, List<String> columnsToFetch, Class<?> priorityColumnDataType) { in AggregateParams() argument 61 mTableName = tableName; in AggregateParams()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/topics/migration/ |
D | TopicsDbMigratorV8Test.java | 140 private void insertTestLoggedTopic(SQLiteDatabase db, String tableName) { in insertTestLoggedTopic() argument 146 tableName, returnedTopicTableColumns), in insertTestLoggedTopic() 149 tableName, returnedTopicTableColumns), in insertTestLoggedTopic() 157 SQLiteDatabase db, String tableName, String columnName){ in getAllValuesFromSelectedColumn() argument 160 String.format("SELECT %1$s FROM %2$s", columnName, tableName), null); in getAllValuesFromSelectedColumn()
|
/packages/apps/Launcher3/src/com/android/launcher3/provider/ |
D | LauncherDbUtils.java | 60 public static IntArray queryIntArray(boolean distinct, SQLiteDatabase db, String tableName, in queryIntArray() argument 63 try (Cursor c = db.query(distinct, tableName, new String[] { columnName }, selection, null, in queryIntArray() argument 72 public static boolean tableExists(SQLiteDatabase db, String tableName) { in tableExists() argument 74 "tbl_name = ?", new String[] {tableName}, in tableExists() argument 80 public static void dropTable(SQLiteDatabase db, String tableName) { in dropTable() argument 81 db.execSQL("DROP TABLE IF EXISTS " + tableName); in dropTable()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/ |
D | DbModifierWithNotification.java | 80 public DbModifierWithNotification(String tableName, SQLiteDatabase db, Context context) { in DbModifierWithNotification() argument 81 this(tableName, db, null, context); in DbModifierWithNotification() 84 public DbModifierWithNotification(String tableName, InsertHelper insertHelper, in DbModifierWithNotification() argument 86 this(tableName, null, insertHelper, context); in DbModifierWithNotification() 89 private DbModifierWithNotification(String tableName, SQLiteDatabase db, in DbModifierWithNotification() argument 91 this(tableName, db, insertHelper, true /* hasReadVoicemail */, context); in DbModifierWithNotification() 94 public DbModifierWithNotification(String tableName, SQLiteDatabase db, in DbModifierWithNotification() argument 96 mTableName = tableName; in DbModifierWithNotification()
|
/packages/services/Telephony/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/util/ |
D | ChatProvider.java | 120 String tableName = ""; in update() local 123 tableName = CHAT_TABLE_NAME; in update() 126 tableName = SUMMARY_TABLE_NAME; in update() 129 if (!TextUtils.isEmpty(tableName)) { in update() 130 result = db.updateWithOnConflict(tableName, contentValues, in update()
|