/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/MediaProvider/src/com/android/providers/media/util/ |
D | SQLiteQueryBuilder.java | 507 final String sql; in query() local 537 sql = wrappedSql; in query() 540 sql = unwrappedSql; in query() 546 Log.d(TAG, sql + " with args " + Arrays.toString(sqlArgs)); in query() 548 Log.d(TAG, sql); in query() 552 null, sql, sqlArgs, in query() 581 final String sql = buildInsert(values); 592 Log.d(TAG, sql + " with args " + Arrays.toString(sqlArgs)); 594 Log.d(TAG, sql); 597 return com.android.providers.media.util.DatabaseUtils.executeInsert(db, sql, sqlArgs); [all …]
|
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 | DatabaseUtils.java | 197 public static @Nullable String maybeBalance(@Nullable String sql) { in maybeBalance() argument 198 if (sql == null) return null; in maybeBalance() 202 for (int i = 0; i < sql.length(); i++) { in maybeBalance() 203 final char c = sql.charAt(i); in maybeBalance() 224 sql = sql + ")"; in maybeBalance() 228 sql = "(" + sql; in maybeBalance() 231 return sql; in maybeBalance() 452 public static long executeInsert(@NonNull SQLiteDatabase db, @NonNull String sql, in executeInsert() argument 455 try (SQLiteStatement st = db.compileStatement(sql)) { in executeInsert() 463 public static int executeUpdateDelete(@NonNull SQLiteDatabase db, @NonNull String sql, in executeUpdateDelete() argument [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/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 | 676 for (final String sql : DatabaseHelper.CREATE_VIEW_SQLS) { in rebuildAllViews() 677 db.execSQL(sql); in rebuildAllViews() 788 for (final String sql : CREATE_TABLE_SQLS) { in createDatabase() 789 db.execSQL(sql); in createDatabase() 792 for (final String sql : CREATE_INDEX_SQLS) { in createDatabase() 793 db.execSQL(sql); in createDatabase() 796 for (final String sql : CREATE_VIEW_SQLS) { in createDatabase() 797 db.execSQL(sql); in createDatabase() 800 for (final String sql : CREATE_TRIGGER_SQLS) { in createDatabase() 801 db.execSQL(sql); in createDatabase()
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/util/ |
D | SQLiteQueryBuilderTest.java | 92 String sql = sqliteQueryBuilder.buildQuery(new String[] { "age", "address" }, in testSetDistinct() local 96 assertEquals(expected, sql); in testSetDistinct() 102 sql = sqliteQueryBuilder.buildQuery(new String[] { "age", "address" }, in testSetDistinct() 106 assertEquals(expected, sql); in testSetDistinct() 112 sql = sqliteQueryBuilder.buildQuery(new String[] { "age", "address" }, in testSetDistinct() 117 assertEquals(expected, sql); in testSetDistinct() 131 String sql = sqliteQueryBuilder.buildQuery(new String[] { "EmployeeName", "EmployeeAge" }, in testSetProjectionMap() local 134 assertEquals(expected, sql); in testSetProjectionMap() 136 sql = sqliteQueryBuilder.buildQuery(null, // projectionIn is null in testSetProjectionMap() 138 assertTrue(sql.matches("SELECT (age|name|address), (age|name|address), (age|name|address) " 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/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/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/ |
D | ContactAggregator2.java | 192 final String sql = "SELECT " + RawContacts._ID + " FROM " + Tables.RAW_CONTACTS + in needAggregate() local 197 final Cursor cursor = db.rawQuery(sql, mSelectionArgs1); in needAggregate() 248 final String sql = in clearSuperPrimarySetting() local 259 final Cursor c = db.rawQuery(sql, null); in clearSuperPrimarySetting() 293 final String sql = in buildExceptionMatchingSql() local 299 return (countOnly) ? RawContactMatchingSelectionStatement.SELECT_COUNT + sql : in buildExceptionMatchingSql() 300 idPairSelection + sql; in buildExceptionMatchingSql() 401 final String sql = "SELECT " + RawContactsColumns.CONCRETE_ID + " FROM " + in canBeReused() local 405 final Cursor cursor = db.rawQuery(sql, mSelectionArgs1); in canBeReused()
|
D | AbstractContactAggregator.java | 751 final String sql = in buildIdentityMatchingSql() local 761 return (countOnly) ? RawContactMatchingSelectionStatement.SELECT_COUNT + sql : in buildIdentityMatchingSql() 762 RawContactMatchingSelectionStatement.SELECT_ID + sql; in buildIdentityMatchingSql() 768 final String sql = in buildEmailMatchingSql() local 776 return (countOnly) ? RawContactMatchingSelectionStatement.SELECT_COUNT + sql : in buildEmailMatchingSql() 777 RawContactMatchingSelectionStatement.SELECT_ID + sql; in buildEmailMatchingSql() 785 final String sql = in buildPhoneMatchingSql() local 800 return (countOnly) ? RawContactMatchingSelectionStatement.SELECT_COUNT + sql : in buildPhoneMatchingSql() 801 RawContactMatchingSelectionStatement.SELECT_ID + sql; in buildPhoneMatchingSql() 912 final String sql = "UPDATE " + Tables.RAW_CONTACTS + in markAggregated() local [all …]
|
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/provider/ |
D | RestoreDbTaskTest.java | 87 private int getCount(SQLiteDatabase db, String sql) { in getCount() argument 88 try (Cursor c = db.rawQuery(sql, null)) { in getCount()
|
/packages/apps/Launcher3/src/com/android/launcher3/model/ |
D | DbDowngradeHelper.java | 68 for (String sql : allCommands) { in onDowngrade() 69 db.execSQL(sql); in onDowngrade()
|
/packages/apps/Launcher3/robolectric_tests/src/com/android/launcher3/model/ |
D | BackupRestoreTest.java | 176 private static int getCount(SQLiteDatabase db, String sql) { in getCount() argument 177 try (Cursor c = db.rawQuery(sql, null)) { in getCount()
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/ |
D | DatabaseHelperTest.java | 405 private static String normalize(String sql) { in normalize() argument 406 return sql != null ? sql.replace(", ", ",") : null; in normalize()
|
/packages/apps/TV/common/src/com/android/tv/common/util/sql/ |
D | SqlParams.java | 17 package com.android.tv.common.util.sql;
|
/packages/providers/CalendarProvider/src/com/android/providers/calendar/ |
D | CalendarDatabaseHelper.java | 2525 final String sql = "SELECT _id, " + in upgradeToVersion69() local 2536 Cursor cursor = db.rawQuery(sql, new String[] {"1"}); in upgradeToVersion69() 3120 final String sql = "DROP " + cursor.getString(0) + " IF EXISTS " + name; in dropTables() local 3122 db.execSQL(sql); in dropTables() 3124 Log.e(TAG, "Error executing " + sql + " " + e.toString()); in dropTables()
|
/packages/services/AlternativeNetworkAccess/tests/src/com/android/ons/ |
D | ONSNetworkScanCtlrTest.java | 37 import java.sql.Array;
|
/packages/apps/Launcher3/src/com/android/launcher3/ |
D | LauncherProvider.java | 739 String sql = "update favorites set intent = replace(intent, " in handleOneTimeDataUpgrade() local 741 db.execSQL(sql); in handleOneTimeDataUpgrade()
|