Home
last modified time | relevance | path

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

12

/cts/tests/tests/database/src/android/database/sqlite/cts/
DSQLiteWalTest.java89 SQLiteDatabase db = mContext.openOrCreateDatabase( in openDatabase() local
91 db.execSQL("PRAGMA synchronous=FULL"); in openDatabase()
92 return db; in openDatabase()
95 private void assertTestTableExists(SQLiteDatabase db) { in assertTestTableExists() argument
96 assertEquals(1, DatabaseUtils.longForQuery(db, "SELECT count(*) FROM test", null)); in assertTestTableExists()
100 SQLiteDatabase db = openDatabase(); in prepareDatabase() local
102 db.execSQL("CREATE TABLE test (column TEXT);"); in prepareDatabase()
103 db.execSQL("INSERT INTO test (column) VALUES (" in prepareDatabase()
107 assertTrue((new File(db.getPath())).exists()); in prepareDatabase()
108 assertTrue((new File(db.getPath() + SHM_SUFFIX)).exists()); in prepareDatabase()
[all …]
DSQLiteOpenHelperTest.java260 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbPath, null); in testWalSchemaChangeVisibilityOnUpgrade() local
261 db.execSQL("CREATE TABLE test_table (_id INTEGER PRIMARY KEY AUTOINCREMENT)"); in testWalSchemaChangeVisibilityOnUpgrade()
262 db.setVersion(1); in testWalSchemaChangeVisibilityOnUpgrade()
263 db.close(); in testWalSchemaChangeVisibilityOnUpgrade()
270 public void onCreate(SQLiteDatabase db) { in testWalSchemaChangeVisibilityOnUpgrade()
274 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in testWalSchemaChangeVisibilityOnUpgrade()
276 db.execSQL("ALTER TABLE test_table ADD column2 INT DEFAULT 1234"); in testWalSchemaChangeVisibilityOnUpgrade()
277 db.execSQL("CREATE TABLE test_table2 (_id INTEGER PRIMARY KEY AUTOINCREMENT)"); in testWalSchemaChangeVisibilityOnUpgrade()
301 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbPath, null); in testWalSchemaChangeVisibilityOnDowngrade() local
302 db.execSQL("CREATE TABLE test_table (_id INTEGER PRIMARY KEY AUTOINCREMENT" in testWalSchemaChangeVisibilityOnDowngrade()
[all …]
DSQLiteDatabaseTest.java152 SQLiteDatabase db = SQLiteDatabase.openDatabase(mDatabaseFilePath, in testOpenDatabase() local
154 assertNotNull(db); in testOpenDatabase()
155 db.close(); in testOpenDatabase()
160 db = SQLiteDatabase.openOrCreateDatabase(dbFile.getPath(), factory); in testOpenDatabase()
161 assertNotNull(db); in testOpenDatabase()
162 db.close(); in testOpenDatabase()
166 db = SQLiteDatabase.openOrCreateDatabase(dbFile, factory); in testOpenDatabase()
167 assertNotNull(db); in testOpenDatabase()
168 db.close(); in testOpenDatabase()
171 db = SQLiteDatabase.create(factory); in testOpenDatabase()
[all …]
/cts/hostsidetests/appsecurity/test-apps/AppWithData/src/com/android/cts/appwithdata/
DCreatePrivateDataTest.java116 SQLiteDatabase db = null; in writeToDatabase() local
119 db = new TestDatabaseOpenHelper(mContext).getWritableDatabase(); in writeToDatabase()
122 assertTrue(db.insert(DB_TABLE_NAME, null, values) != -1); in writeToDatabase()
124 cursor = db.query(DB_TABLE_NAME, new String[] {DB_COLUMN}, in writeToDatabase()
131 if (db != null) { in writeToDatabase()
132 db.close(); in writeToDatabase()
154 SQLiteDatabase db = null; in assertDatabaseDataDoesNotExist() local
157 db = new TestDatabaseOpenHelper(mContext).getWritableDatabase(); in assertDatabaseDataDoesNotExist()
158 cursor = db.query(DB_TABLE_NAME, new String[] {DB_COLUMN}, in assertDatabaseDataDoesNotExist()
165 if (db != null) { in assertDatabaseDataDoesNotExist()
[all …]
/cts/tests/JobScheduler/src/android/jobscheduler/
DDummyJobContentProvider.java69 public void onCreate(SQLiteDatabase db) { in onCreate() argument
71 db.execSQL("CREATE TABLE " + NAME_VALUE_TABLE + " (" + _ID + " INTEGER PRIMARY KEY," in onCreate()
76 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
91 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in insert() local
92 db.insert(tbName, VALUE, values); in insert()
110 SQLiteDatabase db = mDbHelper.getReadableDatabase(); in query() local
111 Cursor c = db.query(tbName, projection, selection, selectionArgs, null, null, sortOrder); in query()
136 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in update() local
137 int count = db.update(tbName, values, selection, selectionArgs); in update()
153 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in delete() local
[all …]
/cts/tests/JobSchedulerSharedUid/src/android/jobscheduler/
DDummyJobContentProvider.java69 public void onCreate(SQLiteDatabase db) { in onCreate() argument
71 db.execSQL("CREATE TABLE " + NAME_VALUE_TABLE + " (" + _ID + " INTEGER PRIMARY KEY," in onCreate()
76 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
91 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in insert() local
92 db.insert(tbName, VALUE, values); in insert()
110 SQLiteDatabase db = mDbHelper.getReadableDatabase(); in query() local
111 Cursor c = db.query(tbName, projection, selection, selectionArgs, null, null, sortOrder); in query()
136 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in update() local
137 int count = db.update(tbName, values, selection, selectionArgs); in update()
153 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in delete() local
[all …]
/cts/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/db/
DDatabase.java17 package android.inputmethodservice.cts.db;
46 public void onCreate(SQLiteDatabase db) { in Database()
47 db.beginTransaction(); in Database()
50 db.execSQL(table.createTableSql()); in Database()
52 db.setTransactionSuccessful(); in Database()
54 db.endTransaction(); in Database()
59 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in Database()
DTable.java17 package android.inputmethodservice.cts.db;
DEntity.java17 package android.inputmethodservice.cts.db;
DField.java17 package android.inputmethodservice.cts.db;
/cts/tests/tests/content/src/android/content/cts/
DDummyProvider.java80 public void onCreate(SQLiteDatabase db) { in onCreate() argument
82 db.execSQL("CREATE TABLE " + NAME_VALUE_TABLE + " (" + _ID + " INTEGER PRIMARY KEY," in onCreate()
87 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
102 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in insert() local
103 db.insert(tbName, VALUE, values); in insert()
121 SQLiteDatabase db = mDbHelper.getReadableDatabase(); in query() local
122 Cursor c = db.query(tbName, projection, selection, selectionArgs, null, null, sortOrder); in query()
167 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in update() local
168 int count = db.update(tbName, values, selection, selectionArgs); in update()
184 SQLiteDatabase db = mDbHelper.getWritableDatabase(); in delete() local
[all …]
DMockContentProvider.java88 public void onCreate(SQLiteDatabase db) { in onCreate() argument
89 db.execSQL("CREATE TABLE TestTable1 (" in onCreate()
93 db.execSQL("CREATE TABLE TestTable2 (" in onCreate()
99 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
100 db.execSQL("DROP TABLE IF EXISTS TestTable1"); in onUpgrade()
101 db.execSQL("DROP TABLE IF EXISTS TestTable2"); in onUpgrade()
102 onCreate(db); in onUpgrade()
143 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local
153 count = db.delete("TestTable1", selection, selectionArgs); in delete()
157 count = db.delete("TestTable1", "_id=" + segment + in delete()
[all …]
DContextTest.java444 SQLiteDatabase db = mContext.openOrCreateDatabase("test.db", in testMoveDatabaseFrom() local
446 db.execSQL("CREATE TABLE list(item TEXT);"); in testMoveDatabaseFrom()
447 db.execSQL("INSERT INTO list VALUES ('cat')"); in testMoveDatabaseFrom()
448 db.execSQL("INSERT INTO list VALUES ('dog')"); in testMoveDatabaseFrom()
449 db.close(); in testMoveDatabaseFrom()
453 db = deviceContext.openOrCreateDatabase("test.db", in testMoveDatabaseFrom()
455 Cursor c = db.query("list", null, null, null, null, null, null); in testMoveDatabaseFrom()
462 db.execSQL("INSERT INTO list VALUES ('mouse')"); in testMoveDatabaseFrom()
463 db.close(); in testMoveDatabaseFrom()
470 db = mContext.openOrCreateDatabase("test.db", in testMoveDatabaseFrom()
[all …]
/cts/tests/appsearch/helper-app/src/com/android/cts/appsearch/helper/
DAppSearchTestService.java150 AppSearchSessionShim db = in indexGloballySearchableDocument() local
169 db.setSchemaAsync(setSchemaRequestBuilder.build()).get(); in indexGloballySearchableDocument()
179 db.putAsync( in indexGloballySearchableDocument()
207 AppSearchSessionShim db = AppSearchSessionShimImpl.createSearchSessionAsync( in indexGloballySearchableDocumentVisibleToConfig() local
233 db.setSchemaAsync(new SetSchemaRequest.Builder() in indexGloballySearchableDocumentVisibleToConfig()
248 db.putAsync( in indexGloballySearchableDocumentVisibleToConfig()
263 AppSearchSessionShim db = in indexNotGloballySearchableDocument() local
270 db.setSchemaAsync( in indexNotGloballySearchableDocument()
287 db.putAsync( in indexNotGloballySearchableDocument()
303 AppSearchSessionShim db = in indexAction() local
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DTestResultsProvider.java251 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local
252 return query.query(db, projection, selection, selectionArgs, null, null, sortOrder); in query()
270 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local
271 long id = db.insert(TABLE_NAME, null, values); in insert()
314 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in update() local
315 int numUpdated = db.update(TABLE_NAME, values, selection, selectionArgs); in update()
339 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local
340 int numDeleted = db.delete(TABLE_NAME, selection, selectionArgs); in delete()
446 public void onCreate(SQLiteDatabase db) { in onCreate() argument
447 db.execSQL("CREATE TABLE " + TABLE_NAME + " (" in onCreate()
[all …]
/cts/hostsidetests/appsearch/test-apps/AppSearchHostTestHelperA/src/android/appsearch/app/helper_a/
DAppSearchDeviceTest.java120 AppSearchSessionShim db = AppSearchSessionShimImpl.createSearchSessionAsync( in testPutDocumentsAsAnotherUser() local
125 db.setSchemaAsync(new SetSchemaRequest.Builder().addSchemas(SCHEMA) in testPutDocumentsAsAnotherUser()
131 db.putAsync(new PutDocumentsRequest.Builder().addGenericDocuments(DOCUMENT) in testPutDocumentsAsAnotherUser()
155 AppSearchSessionShim db = AppSearchSessionShimImpl.createSearchSessionAsync( in testGetDocumentsAsAnotherUser_exist() local
160 List<GenericDocument> outDocuments = doGet(db, NAMESPACE, ID); in testGetDocumentsAsAnotherUser_exist()
/cts/hostsidetests/theme/src/android/theme/cts/
DComparisonTask.java103 final int db = getAlphaScaledBlue(p1) - getAlphaScaledBlue(p2); in checkNeighbors() local
105 if (Math.abs(db) <= threshold && in checkNeighbors()
146 final int db = getAlphaScaledBlue(p1) - getAlphaScaledBlue(p2); in compare() local
148 if (Math.abs(db) > threshold || in compare()
151 System.err.println("fail dr=" + dr+ " dg=" + dg+ " db=" + db); in compare()
/cts/tests/tests/database/src/android/database/cts/
DSQLiteCantOpenDatabaseExceptionTest.java71 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(file, null); in testFileNotReadable() local
72 db.close(); in testFileNotReadable()
/cts/hostsidetests/appcompat/compatchanges/src/com/android/cts/appcompat/
DCompatChangesValidConfigTest.java165 DocumentBuilder db = dbf.newDocumentBuilder(); in getExpectedCompatConfig() local
166 Document dom = db.parse(getClass().getResourceAsStream("/cts_all_compat_config.xml")); in getExpectedCompatConfig()
/cts/hostsidetests/inputmethodservice/deviceside/lib/src/android/inputmethodservice/cts/
DDeviceEvent.java33 import android.inputmethodservice.cts.db.Entity;
34 import android.inputmethodservice.cts.db.Field;
35 import android.inputmethodservice.cts.db.Table;
/cts/tests/tests/security/res/raw/
Dopenssl_heartbleed_test_cert.pem47 df:22:80:99:30:58:2c:61:85:02:e7:4f:f8:7a:db:
48 1e:bb:07:df:f6:99:db:95:de:71:dc:8e:34:3f:fa:
69 7b:71:e1:4c:ac:bf:08:e3:08:72:e6:fd:8c:db:bd:84:01:ac:
79 03:0d:62:28:8a:93:62:2f:d9:b6:db:a9:30:10:f7:f7:12:85:
/cts/tools/cts-api-coverage/src/com/android/cts/apicoverage/
DNdkApiXmlReport.java138 DocumentBuilder db = dbf.newDocumentBuilder(); in main() local
140 dom = db.newDocument(); in main()
239 DocumentBuilder db = dbf.newDocumentBuilder(); in saveToXML() local
241 dom = db.newDocument(); in saveToXML()
/cts/hostsidetests/inputmethodservice/deviceside/provider/src/android/inputmethodservice/cts/provider/
DEventProvider.java27 import android.inputmethodservice.cts.db.Database;
28 import android.inputmethodservice.cts.db.Table;
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCurrentApiHelper.java133 DocumentBuilder db = dbf.newDocumentBuilder(); in parseXmlFile() local
134 Document dom = db.parse(input); in parseXmlFile()
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DSplitAppTest.java648 final SQLiteDatabase db = getContext().openOrCreateDatabase("my_db", in testDataWrite() local
651 db.execSQL("DROP TABLE IF EXISTS my_table"); in testDataWrite()
652 db.execSQL("CREATE TABLE my_table(value INTEGER)"); in testDataWrite()
653 db.execSQL("INSERT INTO my_table VALUES (101), (102), (103)"); in testDataWrite()
655 db.close(); in testDataWrite()
667 final SQLiteDatabase db = getContext().openOrCreateDatabase("my_db", in testDataRead() local
670 final Cursor cursor = db.query("my_table", null, null, null, null, null, "value ASC"); in testDataRead()
683 db.close(); in testDataRead()

12