Home
last modified time | relevance | path

Searched refs:database (Results 1 – 25 of 639) sorted by relevance

12345678910>>...26

/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
DDatabaseTestBase.java4 import android.database.Cursor;
5 import android.database.sqlite.SQLiteDatabase;
24 protected SQLiteDatabase database; field in DatabaseTestBase
29 database = SQLiteDatabase.openDatabase("path", null, 0); in setUp()
30 shDatabase = Robolectric.shadowOf(database); in setUp()
31 database.execSQL("CREATE TABLE table_name (\n" + in setUp()
39 database.execSQL("CREATE TABLE rawtable (\n" + in setUp()
47 database.execSQL("CREATE TABLE exectable (\n" + in setUp()
63 database.insert("rawtable", null, values); in setUp()
72 database.insert("rawtable", null, values2); in setUp()
[all …]
DSQLiteOpenHelperTest.java5 import android.database.sqlite.SQLiteDatabase;
6 import android.database.sqlite.SQLiteDatabase.CursorFactory;
7 import android.database.sqlite.SQLiteOpenHelper;
30 SQLiteDatabase database = helper.getReadableDatabase(); in testInitialGetReadableDatabase() local
31 assertInitialDB(database); in testInitialGetReadableDatabase()
36 SQLiteDatabase database = helper.getReadableDatabase(); in testSubsequentGetReadableDatabase() local
38 database = helper.getReadableDatabase(); in testSubsequentGetReadableDatabase()
40 assertSubsequentDB(database); in testSubsequentGetReadableDatabase()
53 SQLiteDatabase database = helper.getWritableDatabase(); in testInitialGetWritableDatabase() local
54 assertInitialDB(database); in testInitialGetWritableDatabase()
[all …]
DSQLiteStatementTest.java3 import android.database.sqlite.SQLiteDatabase;
4 import android.database.sqlite.SQLiteDoneException;
5 import android.database.sqlite.SQLiteStatement;
21 private SQLiteDatabase database; field in SQLiteStatementTest
25 database = SQLiteDatabase.openDatabase("path", null, 0); in setUp()
26 …SQLiteStatement createStatement = database.compileStatement("CREATE TABLE `routine` (`id` INTEGER … in setUp()
29 …SQLiteStatement createStatement2 = database.compileStatement("CREATE TABLE `countme` (`id` INTEGER… in setUp()
35 database.close(); in tearDown()
40 …SQLiteStatement insertStatement = database.compileStatement("INSERT INTO `routine` (`name` ,`lastU… in testExecuteInsert()
52 Statement statement = shadowOf(database).getConnection().createStatement(); in testExecuteInsert()
[all …]
/external/chromium_org/webkit/browser/fileapi/
Dsandbox_prioritized_origin_database_unittest.cc23 SandboxPrioritizedOriginDatabase database(dir.path()); in TEST() local
26 EXPECT_TRUE(database.InitializePrimaryOrigin(kOrigin1)); in TEST()
29 EXPECT_TRUE(database.GetPathForOrigin(kOrigin1, &path)); in TEST()
30 EXPECT_TRUE(database.GetPathForOrigin(kOrigin2, &path)); in TEST()
33 EXPECT_TRUE(database.HasOriginPath(kOrigin1)); in TEST()
34 EXPECT_TRUE(database.GetPathForOrigin(kOrigin1, &path)); in TEST()
36 EXPECT_TRUE(database.HasOriginPath(kOrigin2)); in TEST()
37 EXPECT_TRUE(database.GetPathForOrigin(kOrigin2, &path)); in TEST()
41 database.ListAllOrigins(&origins); in TEST()
50 database.RemovePathForOrigin(kOrigin1); in TEST()
[all …]
Dsandbox_origin_database_unittest.cc39 SandboxOriginDatabase database(kFSDir); in TEST() local
42 EXPECT_FALSE(database.HasOriginPath(origin)); in TEST()
44 EXPECT_FALSE(database.HasOriginPath(origin)); in TEST()
50 EXPECT_FALSE(database.GetPathForOrigin(std::string(), &path0)); in TEST()
52 EXPECT_TRUE(database.GetPathForOrigin(origin, &path0)); in TEST()
53 EXPECT_TRUE(database.HasOriginPath(origin)); in TEST()
54 EXPECT_TRUE(database.GetPathForOrigin(origin, &path1)); in TEST()
69 SandboxOriginDatabase database(kFSDir); in TEST() local
73 EXPECT_FALSE(database.HasOriginPath(origin0)); in TEST()
74 EXPECT_FALSE(database.HasOriginPath(origin1)); in TEST()
[all …]
Dsandbox_isolated_origin_database_unittest.cc23 SandboxIsolatedOriginDatabase database(kOrigin, dir.path(), in TEST() local
26 EXPECT_TRUE(database.HasOriginPath(kOrigin)); in TEST()
30 EXPECT_FALSE(database.GetPathForOrigin(std::string(), &path1)); in TEST()
31 EXPECT_FALSE(database.GetPathForOrigin("foo", &path1)); in TEST()
33 EXPECT_TRUE(database.HasOriginPath(kOrigin)); in TEST()
34 EXPECT_TRUE(database.GetPathForOrigin(kOrigin, &path1)); in TEST()
35 EXPECT_TRUE(database.GetPathForOrigin(kOrigin, &path2)); in TEST()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowSQLiteOpenHelper.java4 import android.database.sqlite.SQLiteDatabase;
5 import android.database.sqlite.SQLiteDatabase.CursorFactory;
6 import android.database.sqlite.SQLiteOpenHelper;
20 private static SQLiteDatabase database; field in ShadowSQLiteOpenHelper
23 if (database != null) { in __constructor__()
24 database.close(); in __constructor__()
26 database = null; in __constructor__()
31 if (database != null) { in close()
32 database.close(); in close()
34 database = null; in close()
[all …]
/external/chromium_org/third_party/WebKit/Source/modules/webdatabase/
DDatabaseTracker.cpp51 static void databaseClosed(DatabaseBackendBase* database) in databaseClosed() argument
55 createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin()), in databaseClosed()
56 database->stringIdentifier()); in databaseClosed()
85 void DatabaseTracker::addOpenDatabase(DatabaseBackendBase* database) in addOpenDatabase() argument
91 … String originIdentifier = createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin()); in addOpenDatabase()
98 String name(database->stringIdentifier()); in addOpenDatabase()
105 databaseSet->add(database); in addOpenDatabase()
110 …atic PassOwnPtr<NotifyDatabaseObserverOnCloseTask> create(PassRefPtr<DatabaseBackendBase> database) in create() argument
112 return adoptPtr(new NotifyDatabaseObserverOnCloseTask(database)); in create()
126 NotifyDatabaseObserverOnCloseTask(PassRefPtr<DatabaseBackendBase> database) in NotifyDatabaseObserverOnCloseTask() argument
[all …]
DChangeVersionWrapper.cpp46 ASSERT(transaction && transaction->database()); in performPreflight()
48 DatabaseBackend* database = transaction->database(); in performPreflight() local
51 if (!database->getVersionFromDatabase(actualVersion)) { in performPreflight()
52 int sqliteError = database->sqliteDatabase().lastError(); in performPreflight()
53 database->reportChangeVersionResult(1, SQLError::UNKNOWN_ERR, sqliteError); in performPreflight()
55 sqliteError, database->sqliteDatabase().lastErrorMsg()); in performPreflight()
60 database->reportChangeVersionResult(2, SQLError::VERSION_ERR, 0); in performPreflight()
70 ASSERT(transaction && transaction->database()); in performPostflight()
72 DatabaseBackend* database = transaction->database(); in performPostflight() local
74 if (!database->setVersionInDatabase(m_newVersion)) { in performPostflight()
[all …]
DSQLTransactionClient.cpp45 static void databaseModified(DatabaseBackendBase* database) in databaseModified() argument
49 createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin()), in databaseModified()
50 database->stringIdentifier()); in databaseModified()
54 void SQLTransactionClient::didCommitWriteTransaction(DatabaseBackendBase* database) in didCommitWriteTransaction() argument
56 ExecutionContext* executionContext = database->databaseContext()->executionContext(); in didCommitWriteTransaction()
58 … executionContext->postTask(bind(&databaseModified, PassRefPtr<DatabaseBackendBase>(database))); in didCommitWriteTransaction()
62 databaseModified(database); in didCommitWriteTransaction()
65 bool SQLTransactionClient::didExceedQuota(DatabaseBackendBase* database) in didExceedQuota() argument
69 ASSERT(database->databaseContext()->executionContext()->isContextThread()); in didExceedQuota()
DDatabaseThread.cpp105 void DatabaseThread::recordDatabaseOpen(DatabaseBackend* database) in recordDatabaseOpen() argument
108 ASSERT(database); in recordDatabaseOpen()
109 ASSERT(!m_openDatabaseSet.contains(database)); in recordDatabaseOpen()
110 m_openDatabaseSet.add(database); in recordDatabaseOpen()
113 void DatabaseThread::recordDatabaseClosed(DatabaseBackend* database) in recordDatabaseClosed() argument
116 ASSERT(database); in recordDatabaseClosed()
117 ASSERT(m_terminationRequested || m_openDatabaseSet.contains(database)); in recordDatabaseClosed()
118 m_openDatabaseSet.remove(database); in recordDatabaseClosed()
121 bool DatabaseThread::isDatabaseOpen(DatabaseBackend* database) in isDatabaseOpen() argument
124 ASSERT(database); in isDatabaseOpen()
[all …]
DDatabaseTask.cpp62 DatabaseTask::DatabaseTask(DatabaseBackend* database, DatabaseTaskSynchronizer* synchronizer) in DatabaseTask() argument
63 : m_database(database) in DatabaseTask()
109 DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask(DatabaseBackend* database, bool setVersionInNew… in DatabaseOpenTask() argument
110 : DatabaseTask(database, synchronizer) in DatabaseOpenTask()
122 m_success = database()->performOpenAndVerify(m_setVersionInNewDatabase, m_error, errorMessage); in doPerformTask()
137 DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask(DatabaseBackend* database, DatabaseTaskSynchr… in DatabaseCloseTask() argument
138 : DatabaseTask(database, synchronizer) in DatabaseCloseTask()
144 Database::from(database())->close(); in doPerformTask()
158 : DatabaseTask(Database::from(transaction->database()), 0) in DatabaseTransactionTask()
195 DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask(DatabaseBackend* database, Database… in DatabaseTableNamesTask() argument
[all …]
DSQLStatementBackend.cpp121 SQLiteDatabase* database = &db->sqliteDatabase(); in execute() local
123 SQLiteStatement statement(*database, m_statement); in execute()
127 …ss of statement %s - error %i (%s)", m_statement.ascii().data(), result, database->lastErrorMsg()); in execute()
131 …ror::create(SQLError::SYNTAX_ERR, "could not prepare statement", result, database->lastErrorMsg()); in execute()
155 …SQLError::create(SQLError::DATABASE_ERR, "could not bind value", result, database->lastErrorMsg()); in execute()
180 …ror::create(SQLError::DATABASE_ERR, "could not iterate results", result, database->lastErrorMsg()); in execute()
186 resultSet->setInsertId(database->lastInsertRowID()); in execute()
193 …T_ERR, "could not execute statement due to a constaint failure", result, database->lastErrorMsg()); in execute()
197 …r::create(SQLError::DATABASE_ERR, "could not execute statement", result, database->lastErrorMsg()); in execute()
204 resultSet->setRowsAffected(database->lastChanges()); in execute()
[all …]
DDatabaseServer.cpp57 RefPtr<DatabaseBackendBase> database; in openDatabase() local
59database = createDatabase(backendContext, type, name, expectedVersion, displayName, estimatedSize,… in openDatabase()
60 return database.release(); in openDatabase()
67 RefPtr<DatabaseBackendBase> database; in createDatabase() local
70database = adoptRef(new Database(backendContext, name, expectedVersion, displayName, estimatedSize… in createDatabase()
73database = adoptRef(new DatabaseSync(backendContext, name, expectedVersion, displayName, estimated… in createDatabase()
76 if (!database->openAndVerifyVersion(setVersionInNewDatabase, error, errorMessage)) in createDatabase()
78 return database.release(); in createDatabase()
DWorkerGlobalScopeWebDatabase.cpp48 RefPtr<Database> database; in openDatabase() local
52database = dbManager.openDatabase(context, name, version, displayName, estimatedSize, creationCall… in openDatabase()
53 ASSERT(database || error != DatabaseError::None); in openDatabase()
60 return database.release(); in openDatabase()
66 RefPtr<DatabaseSync> database; in openDatabaseSync() local
70database = dbManager.openDatabaseSync(context, name, version, displayName, estimatedSize, creation… in openDatabaseSync()
71 ASSERT(database || error != DatabaseError::None); in openDatabaseSync()
78 return database.release(); in openDatabaseSync()
DDatabaseManager.cpp74 …static PassOwnPtr<DatabaseCreationCallbackTask> create(PassRefPtr<Database> database, PassOwnPtr<D… in create() argument
76 return adoptPtr(new DatabaseCreationCallbackTask(database, creationCallback)); in create()
85 … DatabaseCreationCallbackTask(PassRefPtr<Database> database, PassOwnPtr<DatabaseCallback> callback) in DatabaseCreationCallbackTask() argument
86 : m_database(database) in DatabaseCreationCallbackTask()
229 RefPtr<Database> database = Database::create(context, backend); in openDatabase() local
233 …InspectorInstrumentation::didOpenDatabase(context, database, context->securityOrigin()->host(), na… in openDatabase()
236 … WTF_LOG(StorageAPI, "Scheduling DatabaseCreationCallbackTask for database %p\n", database.get()); in openDatabase()
237database->m_executionContext->postTask(DatabaseCreationCallbackTask::create(database, creationCall… in openDatabase()
240 ASSERT(database); in openDatabase()
241 return database.release(); in openDatabase()
[all …]
DSQLStatementSync.cpp57 SQLiteDatabase* database = &db->sqliteDatabase(); in execute() local
59 SQLiteStatement statement(*database, m_statement); in execute()
66 db->setLastErrorMessage("could not prepare statement", result, database->lastErrorMsg()); in execute()
89 db->setLastErrorMessage("could not bind value", result, database->lastErrorMsg()); in execute()
114 db->setLastErrorMessage("could not iterate results", result, database->lastErrorMsg()); in execute()
120 resultSet->setInsertId(database->lastInsertRowID()); in execute()
132 db->setLastErrorMessage("could not execute statement", result, database->lastErrorMsg()); in execute()
136 resultSet->setRowsAffected(database->lastChanges()); in execute()
/external/chromium_org/chrome/browser/resources/predictors/
Dresource_prefetch_predictor.js19 function updateResourcePrefetchPredictorDb(database) { argument
20 updateResourcePrefetchPredictorDbView(database);
38 function updateResourcePrefetchPredictorDbView(database) { argument
39 if (!database.enabled) {
48 var hasUrlData = database.url_db && database.url_db.length > 0;
49 var hasHostData = database.host_db && database.host_db.length > 0;
52 renderCacheData($('rpp_url_body'), database.url_db);
54 renderCacheData($('rpp_host_body'), database.host_db);
62 function renderCacheData(body, database) { argument
64 for (var i = 0; i < database.length; ++i) {
[all …]
Dautocomplete_action_predictor.js19 function updateAutocompleteActionPredictorDb(database) { argument
25 updateAutocompleteActionPredictorDbView(database);
28 updateAutocompleteActionPredictorDbView(database);
37 function updateAutocompleteActionPredictorDbView(database) { argument
39 var showEnabled = database.enabled && database.db;
52 for (var i = 0; i < database.db.length; ++i) {
53 var entry = database.db[i];
/external/chromium_org/third_party/sqlite/src/doc/
Dpager-invariants.txt6 *** Definition: A page of the database file is said to be "overwriteable" if
16 the database file at the start of the transaction.
18 (1) A page of the database file is never overwritten unless one of the
28 both the content in the database when the rollback journal was written
29 and the content in the database at the beginning of the current
32 (3) Writes to the database file are an integer multiple of the page size
35 (4) Reads from the database file are either aligned on a page boundary and
37 first 100 bytes of the database file.
39 (5) All writes to the database file are synced prior to the rollback journal
42 (6) If a master journal file is used, then all writes to the database file
[all …]
/external/ganymed-ssh2/examples/
DSimpleVerifier.java10 KnownHosts database; field in SimpleVerifier
16 public SimpleVerifier(KnownHosts database) in SimpleVerifier() argument
18 if (database == null) in SimpleVerifier()
21 this.database = database; in SimpleVerifier()
27 int result = database.verifyHostkey(hostname, serverHostKeyAlgorithm, serverHostKey); in verifyServerHostKey()
42 database.addHostkey(new String[] { hostname }, serverHostKeyAlgorithm, serverHostKey); in verifyServerHostKey()
/external/chromium_org/components/test/data/autofill/merge/tools/
Dserialize_profiles.py20 database = sys.argv[1]
21 if not os.path.isfile(database):
22 print "Cannot read database at \"%s\"" % database
27 connection = sqlite3.connect(database, 0)
32 database)
49 database)
61 print "Failed to read the autofill_profiles table from \"%s\"" % database
74 database)
/external/chromium_org/third_party/sqlite/src/test/
Dlock3.test12 # focus of this script is database locks and the operation of the
22 # Establish two connections to the same database. Put some
23 # sample data into the database.
37 # Get a deferred lock on the database using one connection. The
47 # Get an immediate lock on the database using one connection. The
48 # other connection should be able to read the database but not write
57 } {1 {database is locked}}
63 # Get an exclusive lock on the database using one connection. The
64 # other connection should be unable to read or write the database.
69 } {1 {database is locked}}
[all …]
Dbackup2.test25 # Fill a database with test data.
55 # Remember a check-sum on the database file.
82 } {1 {restore failed: source database busy}}
113 } {1 {backup failed: attempt to write a readonly database}}
115 # Try to backup to something that is not a database file.
121 puts $out "This is not a valid database file"
125 } {1 {backup failed: file is encrypted or is not a database}}
127 # Try to backup database that does not exist
133 } {1 {backup failed: unknown database aux1}}
150 } {1 {cannot open source database: unable to open database file}}
[all …]
/external/chromium_org/third_party/WebKit/Source/core/inspector/
DInspectorDatabaseAgent.cpp195 void InspectorDatabaseAgent::didOpenDatabase(PassRefPtr<Database> database, const String& domain, c… in didOpenDatabase() argument
197 if (InspectorDatabaseResource* resource = findByFileName(database->fileName())) { in didOpenDatabase()
198 resource->setDatabase(database); in didOpenDatabase()
202 …RefPtr<InspectorDatabaseResource> resource = InspectorDatabaseResource::create(database, domain, n… in didOpenDatabase()
235 m_frontend = frontend->database(); in setFrontend()
278 Database* database = databaseForId(databaseId); in getDatabaseTableNames() local
279 if (database) { in getDatabaseTableNames()
280 Vector<String> tableNames = database->tableNames(); in getDatabaseTableNames()
296 Database* database = databaseForId(databaseId); in executeSQL() local
297 if (!database) { in executeSQL()
[all …]

12345678910>>...26