#include "components/autofill/core/browser/webdata/autofill_table_utils.h"
#include <initializer_list>
#include <string>
#include <string_view>
#include <vector>
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "sql/database.h"
#include "sql/statement.h"
namespace autofill {
std::u16string Truncate(std::u16string_view data) { … }
bool CreateTable(
sql::Database* db,
std::string_view table_name,
std::initializer_list<std::pair<std::string_view, std::string_view>>
column_names_and_types,
std::initializer_list<std::string_view> composite_primary_key) { … }
bool CreateTableIfNotExists(
sql::Database* db,
std::string_view table_name,
std::initializer_list<std::pair<std::string_view, std::string_view>>
column_names_and_types,
std::initializer_list<std::string_view> composite_primary_key) { … }
bool CreateIndex(sql::Database* db,
std::string_view table_name,
std::initializer_list<std::string_view> columns) { … }
void InsertBuilder(sql::Database* db,
sql::Statement& statement,
std::string_view table_name,
std::initializer_list<std::string_view> column_names,
bool or_replace) { … }
bool RenameTable(sql::Database* db,
std::string_view from,
std::string_view to) { … }
bool DoesColumnExist(sql::Database* db,
std::string_view table_name,
std::string_view column_name) { … }
bool AddColumn(sql::Database* db,
std::string_view table_name,
std::string_view column_name,
std::string_view type) { … }
bool AddColumnIfNotExists(sql::Database* db,
std::string_view table_name,
std::string_view column_name,
std::string_view type) { … }
bool DropColumn(sql::Database* db,
std::string_view table_name,
std::string_view column_name) { … }
bool DropColumnIfExists(sql::Database* db,
std::string_view table_name,
std::string_view column_name) { … }
bool DropTableIfExists(sql::Database* db, std::string_view table_name) { … }
void DeleteBuilder(sql::Database* db,
sql::Statement& statement,
std::string_view table_name,
std::string_view where_clause) { … }
bool Delete(sql::Database* db,
std::string_view table_name,
std::string_view where_clause) { … }
bool DeleteWhereColumnEq(sql::Database* db,
std::string_view table_name,
std::string_view column,
std::string_view value) { … }
bool DeleteWhereColumnEq(sql::Database* db,
std::string_view table_name,
std::string_view column,
int64_t value) { … }
void UpdateBuilder(sql::Database* db,
sql::Statement& statement,
std::string_view table_name,
std::initializer_list<std::string_view> column_names,
std::string_view where_clause) { … }
void SelectBuilder(sql::Database* db,
sql::Statement& statement,
std::string_view table_name,
std::initializer_list<std::string_view> columns,
std::string_view modifiers) { … }
bool SelectByGuid(sql::Database* db,
sql::Statement& statement,
std::string_view table_name,
std::initializer_list<std::string_view> columns,
std::string_view guid) { … }
void SelectBetween(sql::Database* db,
sql::Statement& statement,
std::string_view table_name,
std::initializer_list<std::string_view> columns,
std::string_view column_between,
int64_t low,
int64_t high) { … }
}