chromium/components/user_notes/storage/user_note_database.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "components/user_notes/storage/user_note_database.h"

#include <string_view>

#include "base/files/file_util.h"
#include "base/json/values_util.h"
#include "sql/error_delegate_util.h"
#include "sql/meta_table.h"
#include "sql/statement.h"
#include "sql/transaction.h"

namespace user_notes {

namespace {

// `kCurrentVersionNumber` and `kCompatibleVersionNumber` are used for DB
// migrations. Update both accordingly when changing the schema.
// Version 1 - 2021-04 - Initial Schema - https://crrev.com/c/3546500
const int kCurrentVersionNumber =;

const int kCompatibleVersionNumber =;

}  // namespace

UserNoteDatabase::UserNoteDatabase(const base::FilePath& path_to_database_dir)
    :{}

UserNoteDatabase::~UserNoteDatabase() {}

bool UserNoteDatabase::Init() {}

UserNoteMetadataSnapshot UserNoteDatabase::GetNoteMetadataForUrls(
    const UserNoteStorage::UrlSet& urls) {}

std::vector<std::unique_ptr<UserNote>> UserNoteDatabase::GetNotesById(
    const UserNoteStorage::IdSet& ids) {}

std::unique_ptr<UserNote> UserNoteDatabase::GetNoteById(
    const base::UnguessableToken& id) {}

bool UserNoteDatabase::CreateNote(std::unique_ptr<UserNote> model,
                                  std::u16string note_body_text) {}

bool UserNoteDatabase::UpdateNote(std::unique_ptr<UserNote> model,
                                  std::u16string note_body_text,
                                  bool is_creation) {}

bool UserNoteDatabase::DeleteNoteWithStringId(std::string id) {}

bool UserNoteDatabase::DeleteNote(const base::UnguessableToken& id) {}

bool UserNoteDatabase::DeleteAllForUrl(const GURL& url) {}

bool UserNoteDatabase::DeleteAllForOrigin(const url::Origin& page) {}

bool UserNoteDatabase::DeleteAllNotes() {}

bool UserNoteDatabase::EnsureDBInit() {}

void UserNoteDatabase::DatabaseErrorCallback(int error, sql::Statement* stmt) {}

bool UserNoteDatabase::InitSchema() {}

bool UserNoteDatabase::CreateSchema() {}
}  // namespace user_notes