Searched refs:db (Results 1 - 25 of 38) sorted by relevance

12

/frameworks/base/core/java/android/database/sqlite/
H A DSQLiteOpenHelper.java207 SQLiteDatabase db = mDatabase;
211 if (db != null) {
212 if (writable && db.isReadOnly()) {
213 db.reopenReadWrite();
216 db = SQLiteDatabase.create(null);
221 db = SQLiteDatabase.openDatabase(path, mFactory,
224 db = mContext.openOrCreateDatabase(mName, mEnableWriteAheadLogging ?
235 db = SQLiteDatabase.openDatabase(path, mFactory,
240 onConfigure(db);
242 final int version = db
312 onConfigure(SQLiteDatabase db) argument
320 onCreate(SQLiteDatabase db) argument
342 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
360 onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
378 onOpen(SQLiteDatabase db) argument
[all...]
H A DSQLiteQuery.java36 SQLiteQuery(SQLiteDatabase db, String query, CancellationSignal cancellationSignal) { argument
37 super(db, query, null, cancellationSignal);
H A DSQLiteProgram.java40 SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, argument
42 mDatabase = db;
58 db.getThreadSession().prepare(mSql,
59 db.getThreadDefaultConnectionFlags(assumeReadOnly),
H A DSQLiteDirectCursorDriver.java35 public SQLiteDirectCursorDriver(SQLiteDatabase db, String sql, String editTable, argument
37 mDatabase = db;
H A DSQLiteStatement.java30 SQLiteStatement(SQLiteDatabase db, String sql, Object[] bindArgs) { argument
31 super(db, sql, bindArgs, null);
H A DSQLiteQueryBuilder.java265 * @param db the database to query on
291 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument
294 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder,
302 * @param db the database to query on
330 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument
333 return query(db, projectionIn, selection, selectionArgs,
341 * @param db the database to query on
372 public Cursor query(SQLiteDatabase db, String[] projectionIn, argument
389 validateQuerySql(db, sqlForValidation,
400 return db
410 validateQuerySql(SQLiteDatabase db, String sql, CancellationSignal cancellationSignal) argument
[all...]
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
H A DDatabaseHelper.java69 private static final String DATABASE_NAME = "settings.db";
100 // The owner gets the unadorned db name;
122 private void createSecureTable(SQLiteDatabase db) { argument
123 db.execSQL("CREATE TABLE secure (" +
128 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);");
131 private void createGlobalTable(SQLiteDatabase db) { argument
132 db.execSQL("CREATE TABLE global (" +
137 db.execSQL("CREATE INDEX globalIndex1 ON global (name);");
141 public void onCreate(SQLiteDatabase db) { argument
142 db
195 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument
1594 moveSettingsToNewTable(SQLiteDatabase db, String sourceTable, String destTable, String[] settingsToMove, boolean doIgnore) argument
1632 movePrefixedSettingsToNewTable( SQLiteDatabase db, String sourceTable, String destTable, String[] prefixesToMove) argument
1666 upgradeLockPatternLocation(SQLiteDatabase db) argument
1690 upgradeScreenTimeoutFromNever(SQLiteDatabase db) argument
1714 upgradeVibrateSettingFromNone(SQLiteDatabase db) argument
1736 upgradeScreenTimeout(SQLiteDatabase db) argument
1753 upgradeAutoBrightness(SQLiteDatabase db) argument
1772 loadBookmarks(SQLiteDatabase db) argument
1859 loadVolumeLevels(SQLiteDatabase db) argument
1914 loadVibrateSetting(SQLiteDatabase db, boolean deleteOld) argument
1937 loadVibrateWhenRingingSetting(SQLiteDatabase db) argument
1955 loadSettings(SQLiteDatabase db) argument
1964 loadSystemSettings(SQLiteDatabase db) argument
2033 loadSecureSettings(SQLiteDatabase db) argument
2130 loadGlobalSettings(SQLiteDatabase db) argument
2308 getIntValueFromSystem(SQLiteDatabase db, String name, int defaultValue) argument
2312 getIntValueFromTable(SQLiteDatabase db, String table, String name, int defaultValue) argument
2318 getStringValueFromTable(SQLiteDatabase db, String table, String name, String defaultValue) argument
[all...]
H A DSettingsProvider.java356 // the db file itself will be deleted automatically, but we need to tear down
373 Slog.i(TAG, "Installing settings db helper and caches for user " + userHandle);
390 // Initialization of the db *outside* the locks. It's possible that racing
393 // manages concurrency itself, and it's important that we not run the db
395 SQLiteDatabase db = dbhelper.getWritableDatabase();
399 // separately, and of course it has to run after the db file
403 SettingsFileObserver observer = new SettingsFileObserver(userHandle, db.getPath());
444 SQLiteDatabase db = dbHelper.getReadableDatabase();
445 Cursor c = db.query(
484 // sanity-check the user before touching the db
[all...]
/frameworks/ex/common/java/com/android/common/content/
H A DSyncStateContentProviderHelper.java54 public void createDatabase(SQLiteDatabase db) { argument
55 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_TABLE);
56 db.execSQL("CREATE TABLE " + SYNC_STATE_TABLE + " ("
64 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_META_TABLE);
65 db.execSQL("CREATE TABLE " + SYNC_STATE_META_TABLE + " ("
69 db.insert(SYNC_STATE_META_TABLE, SYNC_STATE_META_VERSION_COLUMN, values);
72 public void onDatabaseOpened(SQLiteDatabase db) { argument
73 long version = DatabaseUtils.longForQuery(db,
77 createDatabase(db);
81 public Cursor query(SQLiteDatabase db, Strin argument
87 insert(SQLiteDatabase db, ContentValues values) argument
91 delete(SQLiteDatabase db, String userWhere, String[] whereArgs) argument
95 update(SQLiteDatabase db, ContentValues values, String selection, String[] selectionArgs) argument
100 update(SQLiteDatabase db, long rowId, Object data) argument
113 onAccountsChanged(SQLiteDatabase db, Account[] accounts) argument
[all...]
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
H A DAggregatorStorage.java44 public void onCreate(SQLiteDatabase db) { argument
45 db.execSQL(mTableCmd);
49 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument
53 db.execSQL("DROP TABLE IF EXISTS " + mTableName);
54 onCreate(db);
H A DBordeauxSessionStorage.java70 public void onCreate(SQLiteDatabase db) { argument
71 db.execSQL(DATABASE_CREATE);
75 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument
79 db.execSQL("DROP TABLE IF EXISTS " + SESSION_TABLE);
80 onCreate(db);
/frameworks/base/services/java/com/android/server/
H A DBootReceiver.java97 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE);
111 if (recovery != null && db != null) {
112 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery);
118 if (db != null) db.addText("SYSTEM_BOOT", headers);
121 addFileToDropBox(db, prefs, headers, "/proc/last_kmsg",
123 addFileToDropBox(db, prefs, headers, "/cache/recovery/log",
125 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console",
127 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads",
129 addAuditErrorsToDropBox(db, pref
159 addFileToDropBox( DropBoxManager db, SharedPreferences prefs, String headers, String filename, int maxSize, String tag) argument
180 addAuditErrorsToDropBox(DropBoxManager db, SharedPreferences prefs, String headers, int maxSize, String tag) argument
208 addFsckErrorsToDropBox(DropBoxManager db, SharedPreferences prefs, String headers, int maxSize, String tag) argument
[all...]
H A DLockSettingsService.java356 SQLiteDatabase db = mOpenHelper.getWritableDatabase();
367 db.beginTransaction();
368 db.delete(TABLE, COLUMN_USERID + "='" + userId + "'", null);
369 db.setTransactionSuccessful();
371 db.endTransaction();
395 private void writeToDb(SQLiteDatabase db, String key, String value, int userId) { argument
401 db.beginTransaction();
403 db.delete(TABLE, COLUMN_KEY + "=? AND " + COLUMN_USERID + "=?",
405 db.insert(TABLE, null, cv);
406 db
439 createTable(SQLiteDatabase db) argument
449 onCreate(SQLiteDatabase db) argument
454 initializeDefaults(SQLiteDatabase db) argument
464 onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) argument
478 maybeEnableWidgetSettingForUsers(SQLiteDatabase db) argument
491 loadSetting(SQLiteDatabase db, String key, int userId, boolean value) argument
[all...]
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
H A DTrackerProvider.java40 private static final String DB_NAME = "tracking.db";
56 public void onCreate(SQLiteDatabase db) { argument
62 db.execSQL(queryBuilder.toString());
63 db.setVersion(DB_VERSION);
67 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument
72 db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
73 onCreate(db);
87 SQLiteDatabase db = mOpenHelper.getWritableDatabase();
88 int result = db.delete(TABLE_NAME, selection, selectionArgs);
100 SQLiteDatabase db
[all...]
/frameworks/base/test-runner/src/android/test/
H A DDatabaseTestUtils.java34 * @param expectedDb the db that is known to have the correct schema
35 * @param db the db whose schema should be checked
37 public static void assertSchemaEquals(SQLiteDatabase expectedDb, SQLiteDatabase db) { argument
39 Set<String> schema = getSchemaSet(db);
43 private static Set<String> getSchemaSet(SQLiteDatabase db) { argument
46 Cursor entityCursor = db.rawQuery("SELECT sql FROM sqlite_master", null);
/frameworks/base/core/java/com/android/internal/content/
H A DSelectionBuilder.java99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { argument
100 return query(db, table, columns, null, null, orderBy, null);
106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, argument
108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having,
115 public int update(SQLiteDatabase db, String table, ContentValues values) { argument
116 return db.update(table, values, getSelection(), getSelectionArgs());
122 public int delete(SQLiteDatabase db, String table) { argument
123 return db.delete(table, getSelection(), getSelectionArgs());
/frameworks/base/core/tests/coretests/src/android/app/activity/
H A DLocalProvider.java45 private static final String DATABASE_NAME = "local.db";
53 public void onCreate(SQLiteDatabase db) { argument
54 db.execSQL("CREATE TABLE data (" +
60 db.execSQL("INSERT INTO data (text, integer) VALUES ('first data', 100);");
64 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { argument
68 db.execSQL("DROP TABLE IF EXISTS data");
69 onCreate(db);
103 SQLiteDatabase db = mOpenHelper.getReadableDatabase();
104 Cursor ret = qb.query(db, projectionIn, selection, selectionArgs,
134 SQLiteDatabase db
[all...]
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
H A DRecentsProvider.java117 private static final String DB_NAME = "recents.db";
129 public void onCreate(SQLiteDatabase db) { argument
131 db.execSQL("CREATE TABLE " + TABLE_RECENT + " (" +
137 db.execSQL("CREATE TABLE " + TABLE_STATE + " (" +
147 db.execSQL("CREATE TABLE " + TABLE_RESUME + " (" +
156 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument
158 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RECENT);
159 db.execSQL("DROP TABLE IF EXISTS " + TABLE_STATE);
160 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RESUME);
161 onCreate(db);
[all...]
/frameworks/base/packages/WAPPushManager/src/com/android/smspush/
H A DWapPushManager.java53 private static final String DATABASE_NAME = "wappush.db";
73 public void onCreate(SQLiteDatabase db) { argument
74 if (LOCAL_LOGV) Log.v(LOG_TAG, "db onCreate.");
88 db.execSQL(sql);
92 public void onUpgrade(SQLiteDatabase db, argument
96 db.execSQL(
98 onCreate(db);
118 protected queryData queryLastApp(SQLiteDatabase db, argument
127 Cursor cur = db.rawQuery(sql, null);
182 SQLiteDatabase db
[all...]
/frameworks/base/core/tests/coretests/src/android/content/
H A DMemoryFileProvider.java63 private static final String DATABASE_NAME = "local.db";
71 public void onCreate(SQLiteDatabase db) { argument
72 db.execSQL("CREATE TABLE data (" +
82 db.insert("data", null, values);
86 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { argument
90 db.execSQL("DROP TABLE IF EXISTS data");
91 onCreate(db);
158 SQLiteDatabase db = mOpenHelper.getReadableDatabase();
159 return DatabaseUtils.blobFileDescriptorForQuery(db, sql, null);
/frameworks/base/core/jni/
H A Dandroid_database_SQLiteConnection.cpp80 sqlite3* const db; member in struct:android::SQLiteConnection
87 SQLiteConnection(sqlite3* db, int openFlags, const String8& path, const String8& label) : argument
88 db(db), openFlags(openFlags), path(path), label(label), canceled(false) { }
131 sqlite3* db; local
132 int err = sqlite3_open_v2(path.string(), &db, sqliteFlags, NULL);
139 if ((sqliteFlags & SQLITE_OPEN_READWRITE) && sqlite3_db_readonly(db, NULL)) {
140 throw_sqlite3_exception(env, db, "Could not open the database in read/write mode.");
141 sqlite3_close(db);
146 err = sqlite3_busy_timeout(db, BUSY_TIMEOUT_M
[all...]
/frameworks/base/core/java/android/content/
H A DSearchRecentSuggestionsProvider.java84 private static final String sDatabaseName = "suggestions.db";
137 public void onCreate(SQLiteDatabase db) { argument
148 db.execSQL(builder.toString());
152 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { argument
155 db.execSQL("DROP TABLE IF EXISTS suggestions");
156 onCreate(db);
226 SQLiteDatabase db = mOpenHelper.getWritableDatabase();
236 count = db.delete(sSuggestions, selection, selectionArgs);
273 SQLiteDatabase db = mOpenHelper.getWritableDatabase();
285 rowID = db
[all...]
/frameworks/base/services/java/com/android/server/accounts/
H A DAccountManagerService.java110 private static final String DATABASE_NAME = "accounts.db";
318 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase();
319 final Cursor cursor = db.query(TABLE_GRANTS,
331 db.delete(TABLE_GRANTS, GRANTS_GRANTEE_UID + "=?",
369 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase();
371 Cursor cursor = db.query(TABLE_ACCOUNTS,
386 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null);
503 final SQLiteDatabase db = accounts.openHelper.getReadableDatabase();
504 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD},
693 final SQLiteDatabase db
761 insertExtraLocked(SQLiteDatabase db, long accountId, String key, String value) argument
993 invalidateAuthTokenLocked(UserAccounts accounts, SQLiteDatabase db, String accountType, String authToken) argument
2002 getAccountIdLocked(SQLiteDatabase db, Account account) argument
2015 getExtrasIdLocked(SQLiteDatabase db, long accountId, String key) argument
2389 onCreate(SQLiteDatabase db) argument
2422 createSharedAccountsTable(SQLiteDatabase db) argument
2430 createAccountsDeletionTrigger(SQLiteDatabase db) argument
2443 createGrantsTable(SQLiteDatabase db) argument
2453 onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) argument
2486 onOpen(SQLiteDatabase db) argument
2995 writeUserDataIntoCacheLocked(UserAccounts accounts, final SQLiteDatabase db, Account account, String key, String value) argument
3009 writeAuthTokenIntoCacheLocked(UserAccounts accounts, final SQLiteDatabase db, Account account, String key, String value) argument
3050 readUserDataForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument
3070 readAuthTokensForAccountFromDatabaseLocked( final SQLiteDatabase db, Account account) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/database/
H A DDatabaseErrorHandlerTest.java35 private static final String DB_NAME = "database_test.db";
79 * this test used to produce a corrupted db. but with new sqlite it instead reports
81 * need to figure out how to cause corruption in db
94 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null,
96 assertTrue(db.isDatabaseIntegrityOk());
/frameworks/base/core/java/android/database/
H A DDatabaseUtils.java753 * @param db the database the table is in
757 public static long queryNumEntries(SQLiteDatabase db, String table) { argument
758 return queryNumEntries(db, table, null, null);
763 * @param db the database the table is in
770 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) { argument
771 return queryNumEntries(db, table, selection, null);
776 * @param db the database the table is in
787 public static long queryNumEntries(SQLiteDatabase db, String table, String selection, argument
790 return longForQuery(db, "select count(*) from " + table + s,
796 * @param db th
801 queryIsEmpty(SQLiteDatabase db, String table) argument
810 longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument
832 stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument
856 blobFileDescriptorForQuery(SQLiteDatabase db, String query, String[] selectionArgs) argument
1013 InsertHelper(SQLiteDatabase db, String tableName) argument
[all...]

Completed in 2825 milliseconds

12