Lines Matching refs:db_
60 sql::InitStatus status = OpenDatabase(&db_, db_name);
65 sql::Transaction transaction(&db_);
78 if (!meta_table_.Init(&db_, kCurrentVersionNumber,
81 !InitFaviconsTable(&db_, false) ||
82 !InitIconMappingTable(&db_, false)) {
83 db_.Close();
100 db_.Close();
109 db_.Close();
120 db_.Close();
148 if (!db_.DoesTableExist("thumbnails")) {
173 if (!db_.Execute(alterations[i])) {
188 if (!db_.Execute("DROP TABLE thumbnails"))
220 db_.Execute("CREATE INDEX favicons_url ON favicons(url)");
224 db_.BeginTransaction();
228 db_.CommitTransaction();
232 DCHECK(db_.transaction_nesting() == 0) <<
234 db_.Execute("VACUUM");
256 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
284 NOTREACHED() << db_.GetErrorMessage();
305 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
323 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
341 sql::Statement select_statement(db_.GetCachedStatement(SQL_FROM_HERE,
368 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
379 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
392 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
405 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
428 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
450 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
459 return db_.GetLastInsertRowId();
463 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
494 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
526 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
537 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
547 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
578 if (!db_.Execute("DROP TABLE icon_mapping"))
582 if (!db_.Execute("ALTER TABLE temp_icon_mapping RENAME TO icon_mapping"))
592 sql::Statement statement(db_.GetCachedStatement(SQL_FROM_HERE,
603 return db_.GetLastInsertRowId();
608 if (!db_.Execute("DROP TABLE favicons"))
612 if (!db_.Execute("ALTER TABLE temp_favicons RENAME TO favicons"))
647 sql::Statement attach(db_.GetUniqueStatement("ATTACH ? AS new_favicons"));
662 NOTREACHED() << db_.GetErrorMessage();
669 if (!db_.Execute("INSERT OR REPLACE INTO new_favicons.favicons "
676 if (!db_.Execute("DETACH new_favicons")) {
682 db_.Close();
685 if (OpenDatabase(&db_, new_db_file) != sql::INIT_OK)
718 db_.Execute("CREATE INDEX icon_mapping_page_url_idx"
720 db_.Execute("CREATE INDEX icon_mapping_icon_id_idx ON icon_mapping(icon_id)");
736 db_.GetCachedStatement(sql::StatementID(statement_name), sql.c_str()));
746 return db_.GetLastInsertRowId();
752 if (!db_.Execute("ALTER TABLE favicons ADD icon_type INTEGER DEFAULT 1")) {