Home
last modified time | relevance | path

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

1234

/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.java258 SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbPath, null); in testWalSchemaChangeVisibilityOnUpgrade() local
259 db.execSQL("CREATE TABLE test_table (_id INTEGER PRIMARY KEY AUTOINCREMENT)"); in testWalSchemaChangeVisibilityOnUpgrade()
260 db.setVersion(1); in testWalSchemaChangeVisibilityOnUpgrade()
261 db.close(); in testWalSchemaChangeVisibilityOnUpgrade()
268 public void onCreate(SQLiteDatabase db) { in testWalSchemaChangeVisibilityOnUpgrade()
272 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in testWalSchemaChangeVisibilityOnUpgrade()
274 db.execSQL("ALTER TABLE test_table ADD column2 INT DEFAULT 1234"); in testWalSchemaChangeVisibilityOnUpgrade()
275 db.execSQL("CREATE TABLE test_table2 (_id INTEGER PRIMARY KEY AUTOINCREMENT)"); in testWalSchemaChangeVisibilityOnUpgrade()
318 public void onCreate(SQLiteDatabase db) { in onCreate() argument
322 public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { in onUpgrade() argument
[all …]
DSQLiteDatabaseTest.java114 SQLiteDatabase db = SQLiteDatabase.openDatabase(mDatabaseFilePath, in testOpenDatabase() local
116 assertNotNull(db); in testOpenDatabase()
117 db.close(); in testOpenDatabase()
122 db = SQLiteDatabase.openOrCreateDatabase(dbFile.getPath(), factory); in testOpenDatabase()
123 assertNotNull(db); in testOpenDatabase()
124 db.close(); in testOpenDatabase()
128 db = SQLiteDatabase.openOrCreateDatabase(dbFile, factory); in testOpenDatabase()
129 assertNotNull(db); in testOpenDatabase()
130 db.close(); in testOpenDatabase()
133 db = SQLiteDatabase.create(factory); in testOpenDatabase()
[all …]
DDatabaseStatementTest.java250 public StatementTestThread(SQLiteDatabase db, SQLiteStatement statement) { in StatementTestThread() argument
252 mDatabase = db; in StatementTestThread()
/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/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/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/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.java346 SQLiteDatabase db = mContext.openOrCreateDatabase("test.db", in testMoveDatabaseFrom() local
348 db.execSQL("CREATE TABLE list(item TEXT);"); in testMoveDatabaseFrom()
349 db.execSQL("INSERT INTO list VALUES ('cat')"); in testMoveDatabaseFrom()
350 db.execSQL("INSERT INTO list VALUES ('dog')"); in testMoveDatabaseFrom()
351 db.close(); in testMoveDatabaseFrom()
355 db = deviceContext.openOrCreateDatabase("test.db", in testMoveDatabaseFrom()
357 Cursor c = db.query("list", null, null, null, null, null, null); in testMoveDatabaseFrom()
364 db.execSQL("INSERT INTO list VALUES ('mouse')"); in testMoveDatabaseFrom()
365 db.close(); in testMoveDatabaseFrom()
372 db = mContext.openOrCreateDatabase("test.db", in testMoveDatabaseFrom()
[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/apps/CtsVerifier/src/com/android/cts/verifier/
DTestResultsProvider.java209 SQLiteDatabase db = mOpenHelper.getReadableDatabase(); in query() local
210 return query.query(db, projection, selection, selectionArgs, null, null, sortOrder); in query()
228 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in insert() local
229 long id = db.insert(TABLE_NAME, null, values); in insert()
272 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in update() local
273 int numUpdated = db.update(TABLE_NAME, values, selection, selectionArgs); in update()
297 SQLiteDatabase db = mOpenHelper.getWritableDatabase(); in delete() local
298 int numDeleted = db.delete(TABLE_NAME, selection, selectionArgs); in delete()
404 public void onCreate(SQLiteDatabase db) { in onCreate() argument
405 db.execSQL("CREATE TABLE " + TABLE_NAME + " (" in onCreate()
[all …]
/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()
DDatabaseCursorTest.java474 public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, in testRequeryWithAlteredSelectionArgs()
476 return new SQLiteCursor(db, masterQuery, editTable, query) { in testRequeryWithAlteredSelectionArgs()
/cts/hostsidetests/appcompat/compatchanges/src/com/android/cts/appcompat/
DCompatChangesValidConfigTest.java112 DocumentBuilder db = dbf.newDocumentBuilder(); in getExpectedCompatConfig() local
113 Document dom = db.parse(getClass().getResourceAsStream("/cts_all_compat_config.xml")); in getExpectedCompatConfig()
/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/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/tools/cts-api-coverage/src/com/android/cts/apicoverage/
DNdkApiXmlReport.java137 DocumentBuilder db = dbf.newDocumentBuilder(); in main() local
139 dom = db.newDocument(); in main()
238 DocumentBuilder db = dbf.newDocumentBuilder(); in saveToXML() local
240 dom = db.newDocument(); in saveToXML()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCurrentApiHelper.java128 DocumentBuilder db = dbf.newDocumentBuilder(); in parseXmlFile() local
129 Document dom = db.parse(apiFile.toURI().toString()); in parseXmlFile()
/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/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/
DSplitAppTest.java646 final SQLiteDatabase db = getContext().openOrCreateDatabase("my_db", in testDataWrite() local
649 db.execSQL("DROP TABLE IF EXISTS my_table"); in testDataWrite()
650 db.execSQL("CREATE TABLE my_table(value INTEGER)"); in testDataWrite()
651 db.execSQL("INSERT INTO my_table VALUES (101), (102), (103)"); in testDataWrite()
653 db.close(); in testDataWrite()
665 final SQLiteDatabase db = getContext().openOrCreateDatabase("my_db", in testDataRead() local
668 final Cursor cursor = db.query("my_table", null, null, null, null, null, "value ASC"); in testDataRead()
681 db.close(); in testDataRead()

1234