/packages/apps/Gallery2/gallerycommon/src/com/android/gallery3d/common/ |
D | EntrySchema.java | 99 private void logExecSql(SQLiteDatabase db, String sql) { in logExecSql() argument 100 db.execSQL(sql); in logExecSql() 300 StringBuilder sql = new StringBuilder("CREATE TABLE "); in createTables() local 301 sql.append(tableName); in createTables() 302 sql.append(" (_id INTEGER PRIMARY KEY AUTOINCREMENT"); in createTables() 306 sql.append(','); in createTables() 307 sql.append(column.name); in createTables() 308 sql.append(' '); in createTables() 309 sql.append(SQLITE_TYPES[column.type]); in createTables() 311 sql.append(" DEFAULT "); in createTables() [all …]
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/sqlite/ |
D | SqlChecker.java | 82 private static InvalidSqlException genException(String message, String sql) { in genException() argument 83 throw new InvalidSqlException(message + " in '" + sql + "'"); in genException() 86 private void throwIfContainsToken(String token, String sql) { in throwIfContainsToken() argument 89 throw genException("Detected disallowed token: " + token, sql); in throwIfContainsToken() 96 public void ensureNoInvalidTokens(@Nullable String sql) { in ensureNoInvalidTokens() argument 97 findTokens(sql, OPTION_NONE, token -> throwIfContainsToken(token, sql)); in ensureNoInvalidTokens() 104 public void ensureSingleTokenOnly(@Nullable String sql) { in ensureSingleTokenOnly() argument 107 findTokens(sql, OPTION_TOKEN_ONLY, token -> { in ensureSingleTokenOnly() 109 throw genException("Multiple tokens detected", sql); in ensureSingleTokenOnly() 112 throwIfContainsToken(token, sql); in ensureSingleTokenOnly() [all …]
|
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/ |
D | SQLiteTokenizer.java | 56 private static IllegalArgumentException genException(String message, String sql) { in genException() argument 57 throw new IllegalArgumentException(message + " in '" + sql + "'"); in genException() 77 public static List<String> tokenize(@Nullable String sql, int options) { in tokenize() argument 79 tokenize(sql, options, res::add); in tokenize() 89 public static void tokenize(@Nullable String sql, int options, Consumer<String> checker) { in tokenize() argument 90 if (sql == null) { in tokenize() 94 final int len = sql.length(); in tokenize() 96 final char ch = peek(sql, pos); in tokenize() 102 while (isAlNum(peek(sql, pos))) { in tokenize() 107 final String token = sql.substring(start, end); in tokenize() [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/util/ |
D | SQLiteTokenizer.java | 56 private static IllegalArgumentException genException(String message, String sql) { in genException() argument 57 throw new IllegalArgumentException(message + " in '" + sql + "'"); in genException() 77 public static List<String> tokenize(@Nullable String sql, int options) { in tokenize() argument 79 tokenize(sql, options, res::add); in tokenize() 89 public static void tokenize(@Nullable String sql, int options, Consumer<String> checker) { in tokenize() argument 90 if (sql == null) { in tokenize() 94 final int len = sql.length(); in tokenize() 96 final char ch = peek(sql, pos); in tokenize() 102 while (isAlNum(peek(sql, pos))) { in tokenize() 107 final String token = sql.substring(start, end); in tokenize() [all …]
|
D | SQLiteQueryBuilder.java | 550 final String sql; in query() local 580 sql = wrappedSql; in query() 583 sql = unwrappedSql; in query() 589 Log.d(TAG, sql + " with args " + Arrays.toString(sqlArgs)); in query() 591 Log.d(TAG, sql); in query() 595 null, sql, sqlArgs, in query() 624 final String sql = buildInsert(values); 635 Log.d(TAG, sql + " with args " + Arrays.toString(sqlArgs)); 637 Log.d(TAG, sql); 640 return com.android.providers.media.util.DatabaseUtils.executeInsert(db, sql, sqlArgs); [all …]
|
D | DatabaseUtils.java | 228 public static @Nullable String maybeBalance(@Nullable String sql) { in maybeBalance() argument 229 if (sql == null) return null; in maybeBalance() 233 for (int i = 0; i < sql.length(); i++) { in maybeBalance() 234 final char c = sql.charAt(i); in maybeBalance() 255 sql = sql + ")"; in maybeBalance() 259 sql = "(" + sql; in maybeBalance() 262 return sql; in maybeBalance() 483 public static long executeInsert(@NonNull SQLiteDatabase db, @NonNull String sql, in executeInsert() argument 486 try (SQLiteStatement st = db.compileStatement(sql)) { in executeInsert() 494 public static int executeUpdateDelete(@NonNull SQLiteDatabase db, @NonNull String sql, in executeUpdateDelete() argument [all …]
|
/packages/providers/TvProvider/src/com/android/providers/tv/util/ |
D | SqliteTokenFinder.java | 70 public static void findTokens(@Nullable String sql, Consumer<Pair<Integer, String>> checker) { in findTokens() argument 71 if (sql == null) { in findTokens() 75 final int len = sql.length(); in findTokens() 77 final char ch = peek(sql, pos); in findTokens() 83 while (isAlNum(peek(sql, pos))) { in findTokens() 88 final String token = sql.substring(start, end); in findTokens() 100 pos = sql.indexOf(ch, pos); in findTokens() 102 throw new IllegalArgumentException("Unterminated quote in" + sql); in findTokens() 104 if (peek(sql, pos + 1) != ch) { in findTokens() 114 String token = sql.substring(quoteStart + 1, quoteEnd); in findTokens() [all …]
|
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/sqlite/ |
D | SqlCheckerTest.java | 28 private ArrayList<String> getTokens(String sql) { in getTokens() argument 31 SqlChecker.findTokens(sql, SqlChecker.OPTION_NONE, token -> tokens.add(token)); in getTokens() 36 private void checkTokens(String sql, String spaceSeparatedExpectedTokens) { in checkTokens() argument 41 assertEquals(expected, getTokens(sql)); in checkTokens() 44 private void assertInvalidSql(String sql, String message) { in assertInvalidSql() argument 46 getTokens(sql); in assertInvalidSql() 167 private void checkEnsureNoInvalidTokens(boolean ok, String sql, String... tokens) { in checkEnsureNoInvalidTokens() argument 169 getChecker(tokens).ensureNoInvalidTokens(sql); in checkEnsureNoInvalidTokens() 172 getChecker(tokens).ensureNoInvalidTokens(sql); in checkEnsureNoInvalidTokens() 203 private void checkEnsureSingleTokenOnly(boolean ok, String sql, String... tokens) { in checkEnsureSingleTokenOnly() argument [all …]
|
/packages/apps/Messaging/src/com/android/messaging/datamodel/ |
D | DatabaseWrapper.java | 215 private void explainQueryPlan(final SQLiteDatabase db, final String sql, in explainQueryPlan() argument 217 if (!Pattern.matches(mExplainQueryPlanRegexp, sql)) { in explainQueryPlan() 220 final Cursor planCursor = db.rawQuery("explain query plan " + sql, queryArgs); in explainQueryPlan() 232 LogUtil.v(TAG, "for query " + sql + "\nplan is: " in explainQueryPlan() 319 public Cursor rawQuery(final String sql, final String[] args) { in rawQuery() argument 321 explainQueryPlan(mDatabase, sql, args); in rawQuery() 328 final Cursor cursor = mDatabase.rawQuery(sql, args); in rawQuery() 332 String.format(Locale.US, "rawQuery %s ==> %d", sql, cursor.getCount())); in rawQuery() 423 public void execSQL(final String sql, final String[] bindArgs) { in execSQL() argument 430 mDatabase.execSQL(sql, bindArgs); in execSQL() [all …]
|
D | DatabaseHelper.java | 678 for (final String sql : DatabaseHelper.CREATE_VIEW_SQLS) { in rebuildAllViews() 679 db.execSQL(sql); in rebuildAllViews() 790 for (final String sql : CREATE_TABLE_SQLS) { in createDatabase() 791 db.execSQL(sql); in createDatabase() 794 for (final String sql : CREATE_INDEX_SQLS) { in createDatabase() 795 db.execSQL(sql); in createDatabase() 798 for (final String sql : CREATE_VIEW_SQLS) { in createDatabase() 799 db.execSQL(sql); in createDatabase() 802 for (final String sql : CREATE_TRIGGER_SQLS) { in createDatabase() 803 db.execSQL(sql); in createDatabase()
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/ |
D | SQLiteQueryBuilderTest.java | 134 String sql = sqliteQueryBuilder.buildQuery(new String[] { "age", "address" }, in testSetDistinct() local 138 assertThat(sql).isEqualTo(expected); in testSetDistinct() 144 sql = sqliteQueryBuilder.buildQuery(new String[] { "age", "address" }, in testSetDistinct() 148 assertThat(sql).isEqualTo(expected); in testSetDistinct() 154 sql = sqliteQueryBuilder.buildQuery(new String[] { "age", "address" }, in testSetDistinct() 159 assertThat(sql).isEqualTo(expected); in testSetDistinct() 172 String sql = sqliteQueryBuilder.buildQuery(new String[] { "EmployeeName", "EmployeeAge" }, in testSetProjectionMap() local 174 assertThat(sql).isEqualTo("SELECT name, age FROM " + TEST_TABLE_NAME); in testSetProjectionMap() 176 sql = sqliteQueryBuilder.buildQuery(null, // projectionIn is null in testSetProjectionMap() 178 assertThat(sql).matches( in testSetProjectionMap() [all …]
|
D | SQLiteTokenizerTest.java | 35 private List<String> getTokens(String sql) { in getTokens() argument 36 return SQLiteTokenizer.tokenize(sql, SQLiteTokenizer.OPTION_NONE); in getTokens() 39 private void checkTokens(String sql, String spaceSeparatedExpectedTokens) { in checkTokens() argument 44 assertEquals(expected, getTokens(sql)); in checkTokens() 47 private void assertInvalidSql(String sql, String message) { in assertInvalidSql() argument 49 getTokens(sql); in assertInvalidSql()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/measurement/migration/ |
D | MeasurementDbMigratorV6.java | 166 for (String sql : ALTER_STATEMENTS_XNA_ASYNC_REGISTRATION) { in alterAsyncRegistrationTable() 167 db.execSQL(sql); in alterAsyncRegistrationTable() 181 for (String sql : ALTER_STATEMENTS_SOURCE_REPORT) { in alterSourceTable() 182 db.execSQL(sql); in alterSourceTable() 197 for (String sql : ALTER_STATEMENTS_XNA_SOURCE) { in alterSourceTable() 198 db.execSQL(sql); in alterSourceTable() 212 for (String sql : ALTER_STATEMENTS_XNA_TRIGGER) { in alterTriggerTable() 213 db.execSQL(sql); in alterTriggerTable() 215 for (String sql : ALTER_TRIGGER_STATEMENTS_V6) { in alterTriggerTable() 216 db.execSQL(sql); in alterTriggerTable()
|
D | MeasurementDbMigratorV10.java | 41 for (String sql : ALTER_STATEMENTS) { in performMigration() 42 db.execSQL(sql); in performMigration()
|
D | MeasurementDbMigratorV23.java | 40 for (String sql : ALTER_STATEMENTS) { in performMigration() 41 db.execSQL(sql); in performMigration()
|
D | MeasurementDbMigratorV18.java | 44 for (String sql : ALTER_STATEMENTS) { in performMigration() 45 db.execSQL(sql); in performMigration()
|
D | MeasurementDbMigratorV12.java | 46 for (String sql : ALTER_STATEMENTS) { in performMigration() 47 db.execSQL(sql); in performMigration()
|
D | MeasurementDbMigratorV8.java | 46 for (String sql : ALTER_STATEMENTS) { in performMigration() 47 db.execSQL(sql); in performMigration()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/ |
D | DbHelperV1.java | 247 for (String sql : TopicsTables.CREATE_STATEMENTS) { in onCreate() 248 db.execSQL(sql); in onCreate() 250 for (String sql : MEASUREMENT_CREATE_STATEMENTS_V1) { in onCreate() 251 db.execSQL(sql); in onCreate() 253 for (String sql : CREATE_INDEXES_V1) { in onCreate() 254 db.execSQL(sql); in onCreate() 256 for (String sql : EnrollmentTables.CREATE_STATEMENTS) { in onCreate() 257 db.execSQL(sql); in onCreate()
|
/packages/providers/TvProvider/tests/src/com/android/providers/tv/util/ |
D | SqliteTokenFinderTest.java | 34 private List<Pair<Integer, String>> getTokens(String sql) { in getTokens() argument 36 SqliteTokenFinder.findTokens(sql, new Consumer<Pair<Integer, String>>() { in getTokens() 45 private void checkTokens(String sql, Pair<Integer, String>... tokens) { in checkTokens() argument 48 assertEquals(expected, getTokens(sql)); in checkTokens() 51 private void checkTokensRegular(String sql, @Nullable String tokens) { in checkTokensRegular() argument 60 assertEquals(expected, getTokens(sql)); in checkTokensRegular() 63 private void assertInvalidSql(String sql, String message) { in assertInvalidSql() argument 65 getTokens(sql); in assertInvalidSql()
|
/packages/providers/ContactsProvider/src/com/android/providers/contacts/database/ |
D | ContactsTableUtil.java | 93 final String sql = "UPDATE " + Tables.CONTACTS in buildUpdateLastUpdateSql() local 102 return sql; in buildUpdateLastUpdateSql() 124 final String sql = "select " + ContactsContract.RawContacts.CONTACT_ID + ", count(1)" in deleteContactIfSingleton() local 131 final Cursor cursor = db.rawQuery(sql, new String[]{rawContactId + ""}); in deleteContactIfSingleton()
|
/packages/apps/TV/libs/ |
D | javax.annotation-api-1.2.jar | ... annotation.sql
public abstract annotation javax.annotation.sql.DataSourceDefinition extends java.lang.Object implements java ... |
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/data/ |
D | OnDevicePersonalizationDbHelper.java | 117 for (String sql : sqls) { in execSqlIgnoreError() 118 execSqlIgnoreError(db, sql); in execSqlIgnoreError() 122 private void execSqlIgnoreError(SQLiteDatabase db, String sql) { in execSqlIgnoreError() argument 124 db.execSQL(sql); in execSqlIgnoreError()
|
/packages/modules/Bluetooth/android/BluetoothLegacyMigration/ |
D | BluetoothLegacyMigration.kt | 182 abstract val sql: String constant in com.google.android.bluetooth.BluetoothLegacyMigration.DatabaseHandler 195 return db.rawQuery(sql, null) in toCursor() 214 override val sql = "select * from $dbTable" constant in com.google.android.bluetooth.BluetoothLegacyMigration 222 override val sql = "select * from $dbTable" constant
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/ |
D | DbHelper.java | 108 for (String sql : TopicsTables.CREATE_STATEMENTS) { in onCreate() 109 db.execSQL(sql); in onCreate() 111 for (String sql : EnrollmentTables.CREATE_STATEMENTS) { in onCreate() 112 db.execSQL(sql); in onCreate()
|