Lines Matching refs:pair_id

465   // Query for the pair_id, name, and value of all form elements that
468 "SELECT DISTINCT a.pair_id, a.name, a.value "
469 "FROM autofill_dates ad JOIN autofill a ON ad.pair_id = a.pair_id "
512 bool AutofillTable::RemoveFormElementForTimeRange(int64 pair_id,
517 "DELETE FROM autofill_dates WHERE pair_id = ? AND "
523 s.BindInt64(0, pair_id);
535 bool AutofillTable::AddToCountOfFormElement(int64 pair_id,
542 if (!GetCountOfFormElement(pair_id, &count))
546 if (!RemoveFormElementForID(pair_id))
550 if (!SetCountOfFormElement(pair_id, count + delta))
558 int64* pair_id,
561 "SELECT pair_id, count FROM autofill "
571 *pair_id = 0;
575 *pair_id = s.ColumnInt64(0);
582 bool AutofillTable::GetCountOfFormElement(int64 pair_id, int* count) {
584 "SELECT count FROM autofill WHERE pair_id = ?"));
590 s.BindInt64(0, pair_id);
599 bool AutofillTable::SetCountOfFormElement(int64 pair_id, int count) {
601 "UPDATE autofill SET count = ? WHERE pair_id = ?"));
608 s.BindInt64(1, pair_id);
618 int64* pair_id) {
635 *pair_id = db_->GetLastInsertRowId();
639 bool AutofillTable::InsertPairIDAndDate(int64 pair_id,
643 "(pair_id, date_created) VALUES (?, ?)"));
649 s.BindInt64(0, pair_id);
685 "SELECT pair_id FROM autofill WHERE TRIM(value)= \"\""));
709 "autofill_dates ad ON a.pair_id=ad.pair_id"));
767 "autofill_dates ad ON a.pair_id=ad.pair_id "
791 std::string sql = "SELECT pair_id FROM autofill "
835 int64 pair_id = db_->GetLastInsertRowId();
837 if (!InsertPairIDAndDate(pair_id, entry.timestamps()[i]))
848 int64 pair_id;
850 if (!GetIDAndCountOfFormElement(element, &pair_id, &count))
853 if (count == 0 && !InsertFormElement(element, &pair_id))
856 if (!SetCountOfFormElement(pair_id, count + 1))
859 if (!InsertPairIDAndDate(pair_id, time))
875 "SELECT pair_id FROM autofill WHERE name = ? AND value= ?"));
1363 bool AutofillTable::RemoveFormElementForID(int64 pair_id) {
1365 "DELETE FROM autofill WHERE pair_id = ?"));
1370 s.BindInt64(0, pair_id);
1372 return RemoveFormElementForTimeRange(pair_id, base::Time(), base::Time(),
1428 "pair_id INTEGER PRIMARY KEY, "
1466 "pair_id INTEGER DEFAULT 0, "
1472 "autofill_dates (pair_id)")) {
1625 std::string query = "DELETE FROM autofill_dates WHERE pair_id IN ("
1626 "SELECT pair_id FROM autofill WHERE " + autofill_is_too_big + ")";