Lines Matching refs:database
31 #include "modules/webdatabase/Database.h"
46 ASSERT(transaction && transaction->database());
48 DatabaseBackend* database = transaction->database();
51 if (!database->getVersionFromDatabase(actualVersion)) {
52 int sqliteError = database->sqliteDatabase().lastError();
53 database->reportChangeVersionResult(1, SQLError::UNKNOWN_ERR, sqliteError);
55 sqliteError, database->sqliteDatabase().lastErrorMsg());
60 database->reportChangeVersionResult(2, SQLError::VERSION_ERR, 0);
61 m_sqlError = SQLError::create(SQLError::VERSION_ERR, "current version of the database and `oldVersion` argument do not match");
70 ASSERT(transaction && transaction->database());
72 DatabaseBackend* database = transaction->database();
74 if (!database->setVersionInDatabase(m_newVersion)) {
75 int sqliteError = database->sqliteDatabase().lastError();
76 database->reportChangeVersionResult(3, SQLError::UNKNOWN_ERR, sqliteError);
77 m_sqlError = SQLError::create(SQLError::UNKNOWN_ERR, "unable to set new version in database",
78 sqliteError, database->sqliteDatabase().lastErrorMsg());
82 database->setExpectedVersion(m_newVersion);
84 database->reportChangeVersionResult(0, -1, 0); // OK
90 transaction->database()->setCachedVersion(m_oldVersion);