Home
last modified time | relevance | path

Searched refs:db (Results 1 – 25 of 49) sorted by relevance

12

/frameworks/compile/mclinker/include/mcld/Support/
DCXADemangle.tcc34 const char* parse_type(const char* first, const char* last, C& db);
36 const char* parse_encoding(const char* first, const char* last, C& db);
38 const char* parse_name(const char* first, const char* last, C& db,
41 const char* parse_expression(const char* first, const char* last, C& db);
43 const char* parse_template_args(const char* first, const char* last, C& db);
45 const char* parse_operator_name(const char* first, const char* last, C& db);
47 const char* parse_unqualified_name(const char* first, const char* last, C& db);
49 const char* parse_decltype(const char* first, const char* last, C& db);
53 print_stack(const C& db) in print_stack() argument
57 for (auto& s : db.names) in print_stack()
[all …]
/frameworks/base/packages/SettingsProvider/src/com/android/providers/settings/
DDatabaseHelper.java120 private void createSecureTable(SQLiteDatabase db) { in createSecureTable() argument
121 db.execSQL("CREATE TABLE secure (" + in createSecureTable()
126 db.execSQL("CREATE INDEX secureIndex1 ON secure (name);"); in createSecureTable()
129 private void createGlobalTable(SQLiteDatabase db) { in createGlobalTable() argument
130 db.execSQL("CREATE TABLE global (" + in createGlobalTable()
135 db.execSQL("CREATE INDEX globalIndex1 ON global (name);"); in createGlobalTable()
139 public void onCreate(SQLiteDatabase db) { in onCreate() argument
140 db.execSQL("CREATE TABLE system (" + in onCreate()
145 db.execSQL("CREATE INDEX systemIndex1 ON system (name);"); in onCreate()
147 createSecureTable(db); in onCreate()
[all …]
/frameworks/compile/mclinker/lib/Support/
DDemangle.cpp46 Db db(a); in isCtorOrDtor() local
47 db.cv = 0; in isCtorOrDtor()
48 db.ref = 0; in isCtorOrDtor()
49 db.encoding_depth = 0; in isCtorOrDtor()
50 db.parsed_ctor_dtor_cv = false; in isCtorOrDtor()
51 db.tag_templates = true; in isCtorOrDtor()
52 db.template_param.emplace_back(a); in isCtorOrDtor()
53 db.fix_forward_references = false; in isCtorOrDtor()
54 db.try_to_parse_template_args = true; in isCtorOrDtor()
56 demangle(pName, pName + pLength, db, internal_status); in isCtorOrDtor()
[all …]
/frameworks/base/core/java/android/database/sqlite/
DSQLiteOpenHelper.java206 SQLiteDatabase db = mDatabase; in getDatabaseLocked() local
210 if (db != null) { in getDatabaseLocked()
211 if (writable && db.isReadOnly()) { in getDatabaseLocked()
212 db.reopenReadWrite(); in getDatabaseLocked()
215 db = SQLiteDatabase.create(null); in getDatabaseLocked()
220 db = SQLiteDatabase.openDatabase(path, mFactory, in getDatabaseLocked()
223 db = mContext.openOrCreateDatabase(mName, mEnableWriteAheadLogging ? in getDatabaseLocked()
234 db = SQLiteDatabase.openDatabase(path, mFactory, in getDatabaseLocked()
239 onConfigure(db); in getDatabaseLocked()
241 final int version = db.getVersion(); in getDatabaseLocked()
[all …]
DSQLiteQueryBuilder.java291 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument
294 return query(db, projectionIn, selection, selectionArgs, groupBy, having, sortOrder, in query()
330 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument
333 return query(db, projectionIn, selection, selectionArgs, in query()
372 public Cursor query(SQLiteDatabase db, String[] projectionIn, in query() argument
389 validateQuerySql(db, sqlForValidation, in query()
400 return db.rawQueryWithFactory( in query()
410 private void validateQuerySql(SQLiteDatabase db, String sql, in validateQuerySql() argument
412 db.getThreadSession().prepare(sql, in validateQuerySql()
413 db.getThreadDefaultConnectionFlags(true /*readOnly*/), cancellationSignal, null); in validateQuerySql()
DSQLiteProgram.java40 SQLiteProgram(SQLiteDatabase db, String sql, Object[] bindArgs, in SQLiteProgram() argument
42 mDatabase = db; in SQLiteProgram()
58 db.getThreadSession().prepare(mSql, in SQLiteProgram()
59 db.getThreadDefaultConnectionFlags(assumeReadOnly), in SQLiteProgram()
/frameworks/ex/common/java/com/android/common/content/
DSyncStateContentProviderHelper.java54 public void createDatabase(SQLiteDatabase db) { in createDatabase() argument
55 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_TABLE); in createDatabase()
56 db.execSQL("CREATE TABLE " + SYNC_STATE_TABLE + " (" in createDatabase()
64 db.execSQL("DROP TABLE IF EXISTS " + SYNC_STATE_META_TABLE); in createDatabase()
65 db.execSQL("CREATE TABLE " + SYNC_STATE_META_TABLE + " (" in createDatabase()
69 db.insert(SYNC_STATE_META_TABLE, SYNC_STATE_META_VERSION_COLUMN, values); in createDatabase()
72 public void onDatabaseOpened(SQLiteDatabase db) { in onDatabaseOpened() argument
73 long version = DatabaseUtils.longForQuery(db, in onDatabaseOpened()
77 createDatabase(db); in onDatabaseOpened()
81 public Cursor query(SQLiteDatabase db, String[] projection, in query() argument
[all …]
/frameworks/base/core/java/com/android/server/
DBootReceiver.java97 final DropBoxManager db = (DropBoxManager) ctx.getSystemService(Context.DROPBOX_SERVICE); in logBootEvents() local
112 if (recovery != null && db != null) { in logBootEvents()
113 db.addText("SYSTEM_RECOVERY_LOG", headers + recovery); in logBootEvents()
135 if (db != null) db.addText("SYSTEM_BOOT", headers); in logBootEvents()
138 addFileWithFootersToDropBox(db, prefs, headers, lastKmsgFooter, in logBootEvents()
140 addFileWithFootersToDropBox(db, prefs, headers, lastKmsgFooter, in logBootEvents()
143 addFileToDropBox(db, prefs, headers, "/cache/recovery/log", in logBootEvents()
145 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_console", in logBootEvents()
147 addFileToDropBox(db, prefs, headers, "/data/dontpanic/apanic_threads", in logBootEvents()
149 addAuditErrorsToDropBox(db, prefs, headers, -LOG_SIZE, "SYSTEM_AUDIT"); in logBootEvents()
[all …]
/frameworks/base/tests/LocationTracker/src/com/android/locationtracker/data/
DTrackerProvider.java56 public void onCreate(SQLiteDatabase db) { in onCreate() argument
62 db.execSQL(queryBuilder.toString()); in onCreate()
63 db.setVersion(DB_VERSION); in onCreate()
67 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
72 db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME); in onUpgrade()
73 onCreate(db); in onUpgrade()
87 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local
88 int result = db.delete(TABLE_NAME, selection, selectionArgs); in delete()
100 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local
101 long rowId = db.insert(TABLE_NAME, null, values); in insert()
[all …]
/frameworks/base/packages/WAPPushManager/src/com/android/smspush/
DWapPushManager.java73 public void onCreate(SQLiteDatabase db) { in onCreate() argument
88 db.execSQL(sql); in onCreate()
92 public void onUpgrade(SQLiteDatabase db, in onUpgrade() argument
118 protected queryData queryLastApp(SQLiteDatabase db, in queryLastApp() argument
123 Cursor cur = db.query(APPID_TABLE_NAME, in queryLastApp()
186 SQLiteDatabase db = dbh.getReadableDatabase(); in processMessage() local
187 WapPushManDBHelper.queryData lastapp = dbh.queryLastApp(db, app_id, content_type); in processMessage()
188 db.close(); in processMessage()
247 SQLiteDatabase db = dbh.getWritableDatabase(); in addPackage() local
248 WapPushManDBHelper.queryData lastapp = dbh.queryLastApp(db, x_app_id, content_type); in addPackage()
[all …]
/frameworks/base/packages/DocumentsUI/src/com/android/documentsui/
DRecentsProvider.java129 public void onCreate(SQLiteDatabase db) { in onCreate() argument
131 db.execSQL("CREATE TABLE " + TABLE_RECENT + " (" + in onCreate()
137 db.execSQL("CREATE TABLE " + TABLE_STATE + " (" + in onCreate()
147 db.execSQL("CREATE TABLE " + TABLE_RESUME + " (" + in onCreate()
156 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
158 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RECENT); in onUpgrade()
159 db.execSQL("DROP TABLE IF EXISTS " + TABLE_STATE); in onUpgrade()
160 db.execSQL("DROP TABLE IF EXISTS " + TABLE_RESUME); in onUpgrade()
161 onCreate(db); in onUpgrade()
174 final SQLiteDatabase db = mHelper.getReadableDatabase(); in query() local
[all …]
/frameworks/base/core/jni/
Dandroid_database_SQLiteConnection.cpp80 sqlite3* const db; member
87 SQLiteConnection(sqlite3* db, int openFlags, const String8& path, const String8& label) : in SQLiteConnection()
88 db(db), openFlags(openFlags), path(path), label(label), canceled(false) { } in SQLiteConnection()
131 sqlite3* db; in nativeOpen() local
132 int err = sqlite3_open_v2(path.string(), &db, sqliteFlags, NULL); in nativeOpen()
139 if ((sqliteFlags & SQLITE_OPEN_READWRITE) && sqlite3_db_readonly(db, NULL)) { in nativeOpen()
140 throw_sqlite3_exception(env, db, "Could not open the database in read/write mode."); in nativeOpen()
141 sqlite3_close(db); in nativeOpen()
146 err = sqlite3_busy_timeout(db, BUSY_TIMEOUT_MS); in nativeOpen()
148 throw_sqlite3_exception(env, db, "Could not set busy timeout"); in nativeOpen()
[all …]
/frameworks/base/core/tests/coretests/src/android/app/activity/
DLocalProvider.java53 public void onCreate(SQLiteDatabase db) { in onCreate() argument
54 db.execSQL("CREATE TABLE data (" + in onCreate()
60 db.execSQL("INSERT INTO data (text, integer) VALUES ('first data', 100);"); in onCreate()
64 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { in onUpgrade() argument
68 db.execSQL("DROP TABLE IF EXISTS data"); in onUpgrade()
69 onCreate(db); in onUpgrade()
103 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local
104 Cursor ret = qb.query(db, projectionIn, selection, selectionArgs, in query()
134 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in update() local
139 count = db.update("data", values, "_id=" + rowId, null); in update()
/frameworks/base/core/java/com/android/internal/content/
DSelectionBuilder.java99 public Cursor query(SQLiteDatabase db, String table, String[] columns, String orderBy) { in query() argument
100 return query(db, table, columns, null, null, orderBy, null); in query()
106 public Cursor query(SQLiteDatabase db, String table, String[] columns, String groupBy, in query() argument
108 return db.query(table, columns, getSelection(), getSelectionArgs(), groupBy, having, in query()
115 public int update(SQLiteDatabase db, String table, ContentValues values) { in update() argument
116 return db.update(table, values, getSelection(), getSelectionArgs()); in update()
122 public int delete(SQLiteDatabase db, String table) { in delete() argument
123 return db.delete(table, getSelection(), getSelectionArgs()); in delete()
/frameworks/base/services/voiceinteraction/java/com/android/server/voiceinteraction/
DDatabaseHelper.java74 public void onCreate(SQLiteDatabase db) { in onCreate() argument
76 db.execSQL(CREATE_TABLE_SOUND_MODEL); in onCreate()
80 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
82 db.execSQL("DROP TABLE IF EXISTS " + SoundModelContract.TABLE); in onUpgrade()
83 onCreate(db); in onUpgrade()
93 SQLiteDatabase db = getWritableDatabase(); in updateKeyphraseSoundModel() local
108 return db.insertWithOnConflict(SoundModelContract.TABLE, null, values, in updateKeyphraseSoundModel()
111 db.close(); in updateKeyphraseSoundModel()
132 SQLiteDatabase db = getWritableDatabase(); in deleteKeyphraseSoundModel() local
136 return db.delete(SoundModelContract.TABLE, soundModelClause, null) != 0; in deleteKeyphraseSoundModel()
[all …]
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/
DAggregatorStorage.java44 public void onCreate(SQLiteDatabase db) { in onCreate() argument
45 db.execSQL(mTableCmd); in onCreate()
49 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
53 db.execSQL("DROP TABLE IF EXISTS " + mTableName); in onUpgrade()
54 onCreate(db); in onUpgrade()
DBordeauxSessionStorage.java70 public void onCreate(SQLiteDatabase db) { in onCreate() argument
71 db.execSQL(DATABASE_CREATE); in onCreate()
75 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
79 db.execSQL("DROP TABLE IF EXISTS " + SESSION_TABLE); in onUpgrade()
80 onCreate(db); in onUpgrade()
/frameworks/base/core/java/android/content/
DSearchRecentSuggestionsProvider.java137 public void onCreate(SQLiteDatabase db) { in onCreate() argument
148 db.execSQL(builder.toString()); in onCreate()
152 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
155 db.execSQL("DROP TABLE IF EXISTS suggestions"); in onUpgrade()
156 onCreate(db); in onUpgrade()
226 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local
236 count = db.delete(sSuggestions, selection, selectionArgs); in delete()
273 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local
285 rowID = db.insert(sSuggestions, NULL_COLUMN, values); in insert()
321 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local
[all …]
/frameworks/base/services/core/java/com/android/server/accounts/
DAccountManagerService.java339 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); in purgeOldGrants() local
340 final Cursor cursor = db.query(TABLE_GRANTS, in purgeOldGrants()
352 db.delete(TABLE_GRANTS, GRANTS_GRANTEE_UID + "=?", in purgeOldGrants()
390 final SQLiteDatabase db = accounts.openHelper.getWritableDatabase(); in validateAccountsInternal() local
392 Cursor cursor = db.query(TABLE_ACCOUNTS, in validateAccountsInternal()
407 db.delete(TABLE_ACCOUNTS, ACCOUNTS_ID + "=" + accountId, null); in validateAccountsInternal()
524 final SQLiteDatabase db = accounts.openHelper.getReadableDatabase(); in readPasswordInternal() local
525 Cursor cursor = db.query(TABLE_ACCOUNTS, new String[]{ACCOUNTS_PASSWORD}, in readPasswordInternal()
563 final SQLiteDatabase db = accounts.openHelper.getReadableDatabase(); in readPreviousNameInternal() local
564 Cursor cursor = db.query( in readPreviousNameInternal()
[all …]
/frameworks/base/core/tests/coretests/src/android/content/
DMemoryFileProvider.java71 public void onCreate(SQLiteDatabase db) { in onCreate() argument
72 db.execSQL("CREATE TABLE data (" + in onCreate()
82 db.insert("data", null, values); in onCreate()
86 public void onUpgrade(SQLiteDatabase db, int oldVersion, int currentVersion) { in onUpgrade() argument
90 db.execSQL("DROP TABLE IF EXISTS data"); in onUpgrade()
91 onCreate(db); in onUpgrade()
158 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in getBlobColumnAsFile() local
159 return DatabaseUtils.blobFileDescriptorForQuery(db, sql, null); in getBlobColumnAsFile()
/frameworks/base/services/core/java/com/android/server/
DLockSettingsService.java515 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in removeUser() local
531 db.beginTransaction(); in removeUser()
532 db.delete(TABLE, COLUMN_USERID + "='" + userId + "'", null); in removeUser()
533 db.setTransactionSuccessful(); in removeUser()
535 db.endTransaction(); in removeUser()
564 private void writeToDb(SQLiteDatabase db, String key, String value, int userId) { in writeToDb() argument
570 db.beginTransaction(); in writeToDb()
572 db.delete(TABLE, COLUMN_KEY + "=? AND " + COLUMN_USERID + "=?", in writeToDb()
574 db.insert(TABLE, null, cv); in writeToDb()
575 db.setTransactionSuccessful(); in writeToDb()
[all …]
/frameworks/base/test-runner/src/android/test/
DDatabaseTestUtils.java37 public static void assertSchemaEquals(SQLiteDatabase expectedDb, SQLiteDatabase db) { in assertSchemaEquals() argument
39 Set<String> schema = getSchemaSet(db); in assertSchemaEquals()
43 private static Set<String> getSchemaSet(SQLiteDatabase db) { in getSchemaSet() argument
46 Cursor entityCursor = db.rawQuery("SELECT sql FROM sqlite_master", null); in getSchemaSet()
/frameworks/base/core/java/android/database/
DDatabaseUtils.java757 public static long queryNumEntries(SQLiteDatabase db, String table) { in queryNumEntries() argument
758 return queryNumEntries(db, table, null, null); in queryNumEntries()
770 public static long queryNumEntries(SQLiteDatabase db, String table, String selection) { in queryNumEntries() argument
771 return queryNumEntries(db, table, selection, null); in queryNumEntries()
787 public static long queryNumEntries(SQLiteDatabase db, String table, String selection, in queryNumEntries() argument
790 return longForQuery(db, "select count(*) from " + table + s, in queryNumEntries()
801 public static boolean queryIsEmpty(SQLiteDatabase db, String table) { in queryIsEmpty() argument
802 long isEmpty = longForQuery(db, "select exists(select 1 from " + table + ")", null); in queryIsEmpty()
810 public static long longForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { in longForQuery() argument
811 SQLiteStatement prog = db.compileStatement(query); in longForQuery()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DNotificationUsageStats.java557 public void onCreate(SQLiteDatabase db) { in SQLiteLog()
558 db.execSQL("CREATE TABLE " + TAB_LOG + " (" + in SQLiteLog()
582 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in SQLiteLog()
585 db.execSQL("DROP TABLE IF EXISTS " + TAB_LOG); in SQLiteLog()
586 onCreate(db); in SQLiteLog()
609 SQLiteDatabase db = mHelper.getReadableDatabase(); in printPostFrequencies() local
622 Cursor cursor = db.rawQuery(q, null); in printPostFrequencies()
649 SQLiteDatabase db = mHelper.getWritableDatabase(); in writeEvent() local
650 if (db.insert(TAB_LOG, null, cv) < 0) { in writeEvent()
654 pruneIfNecessary(db); in writeEvent()
[all …]
/frameworks/base/docs/html/training/basics/data-storage/
Ddatabases.jd25 <li><a href="{@docRoot}guide/topics/data/data-storage.html#db">Using Databases</a></li>
151 public static final String DATABASE_NAME = &quot;FeedReader.db&quot;;
156 public void onCreate(SQLiteDatabase db) {
157 db.execSQL(SQL_CREATE_ENTRIES);
159 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
162 db.execSQL(SQL_DELETE_ENTRIES);
163 onCreate(db);
165 public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
166 onUpgrade(db, oldVersion, newVersion);
188 SQLiteDatabase db = mDbHelper.getWritableDatabase();
[all …]

12