/frameworks/base/core/tests/coretests/src/android/database/sqlite/ |
SQLiteCursorTest.java | 30 private SQLiteDatabase mDatabase; 42 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); 43 assertNotNull(mDatabase); 45 mDatabase.execSQL("CREATE TABLE " + TABLE_NAME + " (i int, j int);"); 50 mDatabase.close(); 62 mDatabase.beginTransaction(); 63 mDatabase.execSQL("CREATE TABLE " + testTable + " (col1 int, desc text not null);"); 64 mDatabase.setTransactionSuccessful(); 65 mDatabase.endTransaction(); 82 mDatabase.beginTransaction() [all...] |
/external/chromium_org/android_webview/java/src/org/chromium/android_webview/ |
HttpAuthDatabase.java | 35 private SQLiteDatabase mDatabase = null; 97 mDatabase = context.openOrCreateDatabase(databaseFile, 0, null); 101 mDatabase = context.openOrCreateDatabase(databaseFile, 0, null); 105 if (mDatabase == null) { 111 if (mDatabase.getVersion() != DATABASE_VERSION) { 112 mDatabase.beginTransactionNonExclusive(); 115 mDatabase.setTransactionSuccessful(); 117 mDatabase.endTransaction(); 123 mDatabase.execSQL("CREATE TABLE " + HTTPAUTH_TABLE_NAME 131 mDatabase.setVersion(DATABASE_VERSION) [all...] |
/cts/tests/tests/database/src/android/database/sqlite/cts/ |
SQLiteDatabaseTest.java | 44 private SQLiteDatabase mDatabase; 75 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile, null); 76 assertNotNull(mDatabase); 85 mDatabase.close(); 164 mDatabase.execSQL("CREATE TABLE test (num INTEGER);"); 165 mDatabase.execSQL("INSERT INTO test (num) VALUES (0)"); 173 assertFalse(mDatabase.inTransaction()); 174 mDatabase.beginTransaction(); 175 assertTrue(mDatabase.inTransaction()); 177 mDatabase.setTransactionSuccessful() [all...] |
SQLiteFtsTest.java | 41 private SQLiteDatabase mDatabase; 46 mDatabase = getContext().openOrCreateDatabase("CTS_FTS", Context.MODE_PRIVATE, null); 52 final String path = mDatabase.getPath(); 53 mDatabase.close(); 106 mDatabase.execSQL( 115 mDatabase.insert(table, null, values); 120 return mDatabase.query(table, new String[] { "snippet(" + table + ")" },
|
DatabaseStatementTest.java | 44 private SQLiteDatabase mDatabase; 51 mDatabase = getContext().openOrCreateDatabase(DATABASE_NAME, Context.MODE_PRIVATE, null); 52 assertNotNull(mDatabase); 53 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 58 mDatabase.close(); 73 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); 75 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); 76 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); 77 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); 83 SQLiteStatement statement = mDatabase.compileStatement("DELETE FROM test") [all...] |
SQLiteProgramTest.java | 33 private SQLiteDatabase mDatabase; 40 mDatabase = getContext().openOrCreateDatabase(DATABASE_NAME, Context.MODE_PRIVATE, null); 41 assertNotNull(mDatabase); 46 mDatabase.close(); 53 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, text1 TEXT, text2 TEXT, " + 55 mDatabase.execSQL("INSERT INTO test (text1, text2, num1, num2, image) " + 57 mDatabase.execSQL("INSERT INTO test (text1, text2, num1, num2, image) " + 61 statement = mDatabase.compileStatement("SELECT num1 FROM test WHERE num2 = ?;"); 70 statement = mDatabase.compileStatement("SELECT text1 FROM test WHERE text2 = ?;"); 92 cursor = mDatabase.query("test", new String[]{"text1"}, "where text1='a'" [all...] |
SQLiteCursorTest.java | 37 private SQLiteDatabase mDatabase; 50 mDatabase = getContext().openOrCreateDatabase(DATABASE_FILE, Context.MODE_PRIVATE, null); 57 mDatabase.close(); 63 SQLiteDirectCursorDriver cursorDriver = new SQLiteDirectCursorDriver(mDatabase, 66 new SQLiteCursor(mDatabase, cursorDriver, TABLE_NAME, null); 147 mDatabase.execSQL(DELETE_1); 155 mDatabase.execSQL(DELETE_2); 166 mDatabase.disableWriteAheadLogging(); 167 mDatabase.execSQL("create table testRequery2 (i int);"); 168 mDatabase.execSQL("insert into testRequery2 values(1);") [all...] |
SQLiteStatementTest.java | 51 private SQLiteDatabase mDatabase; 58 mDatabase = getContext().openOrCreateDatabase(DATABASE_NAME, Context.MODE_PRIVATE, null); 59 assertNotNull(mDatabase); 60 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 65 mDatabase.close(); 71 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); 75 mDatabase.execSQL("CREATE TABLE blob_test (_id INTEGER PRIMARY KEY, data BLOB)"); 80 mDatabase.insert("blob_test", null, values); 85 mDatabase.disableWriteAheadLogging(); 88 assertEquals(0, DatabaseUtils.longForQuery(mDatabase, "select count(*) from test", null)) [all...] |
/frameworks/base/core/tests/coretests/src/android/database/ |
DatabaseLocaleTest.java | 33 private SQLiteDatabase mDatabase; 48 mDatabase = SQLiteDatabase.create(null); 49 mDatabase.execSQL( 55 mDatabase.execSQL("INSERT INTO test (data) VALUES('" + s + "');"); 61 mDatabase.close(); 67 Cursor c = mDatabase.rawQuery(sql, null); 91 mDatabase.setLocale(new Locale("en", "US")); 114 mDatabase.execSQL("INSERT INTO test(id, data) VALUES(1, '" + expectedString + "')"); 115 cursor = mDatabase.rawQuery("SELECT data FROM test WHERE id = 1", null);
|
DatabaseStressTest.java | 34 private SQLiteDatabase mDatabase; 47 mDatabase = c.openOrCreateDatabase("database_test.db", 0, null); 49 assertNotNull(mDatabase); 50 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 52 mDatabase.execSQL("CREATE TABLE IF NOT EXISTS test (_id INTEGER PRIMARY KEY, data TEXT);"); 58 mDatabase.close(); 71 mDatabase.execSQL("INSERT INTO test (data) VALUES (?)", strArr); 72 mDatabase.execSQL("delete from test;"); 93 mDatabase.execSQL("INSERT INTO test (data) VALUES (?)", strArr);
|
DatabaseLockTest.java | 38 private SQLiteDatabase mDatabase; 51 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); 52 assertNotNull(mDatabase); 57 mDatabase.close(); 74 mDatabase.beginTransaction(); 85 mDatabase.endTransaction(); 101 mDatabase.beginTransaction(); 108 mDatabase.endTransaction(); 126 mDatabase.beginTransaction(); 138 mDatabase.endTransaction() [all...] |
DatabaseStatementTest.java | 38 private SQLiteDatabase mDatabase; 50 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); 51 assertNotNull(mDatabase); 52 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 57 mDatabase.close(); 72 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); 74 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); 75 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); 76 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); 82 SQLiteStatement statement = mDatabase.compileStatement("DELETE FROM test") [all...] |
DatabaseErrorHandlerTest.java | 33 private SQLiteDatabase mDatabase; 46 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null, 48 assertNotNull(mDatabase); 53 mDatabase.close(); 59 new MyDatabaseCorruptionHandler().onCorruption(mDatabase); 66 mDatabase.execSQL("create table t (i int);"); 75 mDatabase.execSQL("select * from t;");
|
DatabaseGeneralTest.java | 52 private SQLiteDatabase mDatabase; 63 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); 64 assertNotNull(mDatabase); 65 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 70 mDatabase.close(); 85 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); 87 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); 88 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); 89 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); 94 assertEquals(CURRENT_DATABASE_VERSION, mDatabase.getVersion()) [all...] |
NewDatabasePerformanceTests.java | 41 protected SQLiteDatabase mDatabase; 49 mDatabase = 52 assertTrue(mDatabase != null); 53 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 57 mDatabase.close(); 123 mDatabase 129 mDatabase.execSQL(statements[i]); 155 mDatabase 157 mDatabase.execSQL("CREATE INDEX i1c ON t1(c)"); 162 mDatabase.execSQL(statements[i]) [all...] |
DatabaseCursorTest.java | 48 private SQLiteDatabase mDatabase; 60 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); 61 assertNotNull(mDatabase); 62 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 67 mDatabase.close(); 82 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); 84 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); 85 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); 86 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); 92 mDatabase.execSQL [all...] |
/frameworks/base/core/java/android/database/sqlite/ |
SQLiteOpenHelper.java | 59 private SQLiteDatabase mDatabase; 131 if (mDatabase != null && mDatabase.isOpen() && !mDatabase.isReadOnly()) { 133 mDatabase.enableWriteAheadLogging(); 135 mDatabase.disableWriteAheadLogging(); 193 if (mDatabase != null) { 194 if (!mDatabase.isOpen()) { 195 // Darn! The user closed the database by calling mDatabase.close(). 196 mDatabase = null [all...] |
SQLiteProgram.java | 33 private final SQLiteDatabase mDatabase; 42 mDatabase = db; 84 return mDatabase; 101 return mDatabase.getThreadSession(); 106 return mDatabase.getThreadDefaultConnectionFlags(mReadOnly); 111 mDatabase.onCorruption();
|
SQLiteDirectCursorDriver.java | 29 private final SQLiteDatabase mDatabase; 37 mDatabase = db; 44 final SQLiteQuery query = new SQLiteQuery(mDatabase, mSql, mCancellationSignal); 52 cursor = factory.newCursor(mDatabase, this, mEditTable, query);
|
/cts/tests/tests/database/src/android/database/cts/ |
DatabaseCursorTest.java | 48 private SQLiteDatabase mDatabase; 62 mDatabase = SQLiteDatabase.openOrCreateDatabase(mDatabaseFile.getPath(), null); 63 assertNotNull(mDatabase); 64 mDatabase.setVersion(CURRENT_DATABASE_VERSION); 69 mDatabase.close(); 98 mDatabase.execSQL("CREATE TABLE test (_id INTEGER PRIMARY KEY, data TEXT);"); 100 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString1 + "');"); 101 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString2 + "');"); 102 mDatabase.execSQL("INSERT INTO test (data) VALUES ('" + sString3 + "');"); 108 mDatabase.execSQL [all...] |
DatabaseUtils_InsertHelperTest.java | 32 private SQLiteDatabase mDatabase; 39 mDatabase = getContext().openOrCreateDatabase(DATABASE_NAME, Context.MODE_PRIVATE, null); 40 assertNotNull(mDatabase); 41 mInsertHelper = new InsertHelper(mDatabase, TEST_TABLE_NAME); 47 mDatabase.close(); 53 new InsertHelper(mDatabase, TEST_TABLE_NAME); 61 mDatabase.execSQL("CREATE TABLE " + TEST_TABLE_NAME + " (_id INTEGER PRIMARY KEY, " + 76 mDatabase.execSQL("CREATE TABLE " + TEST_TABLE_NAME + "(_id INTEGER PRIMARY KEY," + 100 Cursor cursor = mDatabase.query(TEST_TABLE_NAME, projection, null, null, null, null, null); 125 cursor = mDatabase.query(TEST_TABLE_NAME, projection, null, null, null, null, null) [all...] |
MergeCursorTest.java | 41 private SQLiteDatabase mDatabase; 71 mDatabase.close(); 100 mDatabase.execSQL("CREATE TABLE " + TABLE5_NAME + " (_id INTEGER PRIMARY KEY," 103 mDatabase.execSQL(sql); 106 cursors[0] = mDatabase.query(TABLE5_NAME, null, null, null, null, null, null); 146 mCursors[i] = mDatabase.query(tableNames[i], null, null, null, null, null, null); 291 mDatabase.execSQL("INSERT INTO " + TABLE1_NAME + " (number_1) VALUES ('" + TEST_VALUE1 297 mDatabase.execSQL("INSERT INTO " + TABLE2_NAME + " (number_1) VALUES ('" + TEST_VALUE2 314 mDatabase.execSQL("CREATE TABLE " + tablename + " (_id INTEGER PRIMARY KEY," 320 mDatabase.execSQL(sql, args) [all...] |
/frameworks/ml/bordeaux/service/src/android/bordeaux/services/ |
AggregatorStorage.java | 32 protected SQLiteDatabase mDatabase;
|
/packages/apps/Gallery2/src/com/android/gallery3d/data/ |
DownloadCache.java | 75 private final SQLiteDatabase mDatabase; 85 mDatabase = new DatabaseHelper(application.getAndroidContext()) 92 Cursor cursor = mDatabase.query(TABLE_NAME, QUERY_PROJECTION, 154 mDatabase.update(TABLE_NAME, values, 160 Cursor cursor = mDatabase.query(TABLE_NAME, 177 mDatabase.delete(TABLE_NAME, 199 return mDatabase.insert(TABLE_NAME, "", values); 210 Cursor cursor = mDatabase.query( 279 // should be used in synchronized block of mDatabase
|
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/ |
ShadowSQLiteProgram.java | 18 protected SQLiteDatabase mDatabase; 22 mDatabase = db; 70 if (!mDatabase.isOpen()) { 71 throw new IllegalStateException("database " + mDatabase.getPath() + " already closed");
|