#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "sql/statement.h"
#include <stddef.h>
#include <stdint.h>
#include <optional>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/dcheck_is_on.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_functions.h"
#include "base/numerics/safe_conversions.h"
#include "base/sequence_checker.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/scoped_blocking_call.h"
#include "base/time/time.h"
#include "sql/database.h"
#include "sql/sqlite_result_code.h"
#include "sql/sqlite_result_code_values.h"
#include "third_party/sqlite/sqlite3.h"
namespace sql {
int64_t Statement::TimeToSqlValue(base::Time time) { … }
Statement::Statement()
: … { … }
Statement::Statement(scoped_refptr<Database::StatementRef> ref)
: … { … }
Statement::~Statement() { … }
void Statement::Assign(scoped_refptr<Database::StatementRef> ref) { … }
void Statement::Clear() { … }
bool Statement::CheckValid() const { … }
SqliteResultCode Statement::StepInternal() { … }
void Statement::ReportQueryExecutionMetrics() const { … }
bool Statement::Run() { … }
bool Statement::Step() { … }
void Statement::Reset(bool clear_bound_vars) { … }
bool Statement::Succeeded() const { … }
void Statement::BindNull(int param_index) { … }
void Statement::BindBool(int param_index, bool val) { … }
void Statement::BindInt(int param_index, int val) { … }
void Statement::BindInt64(int param_index, int64_t val) { … }
void Statement::BindDouble(int param_index, double val) { … }
void Statement::BindTime(int param_index, base::Time val) { … }
void Statement::BindTimeDelta(int param_index, base::TimeDelta delta) { … }
void Statement::BindCString(int param_index, const char* val) { … }
void Statement::BindString(int param_index, std::string_view value) { … }
void Statement::BindString16(int param_index, std::u16string_view value) { … }
void Statement::BindBlob(int param_index, base::span<const uint8_t> value) { … }
int Statement::ColumnCount() const { … }
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
ColumnType Statement::GetColumnType(int col) { … }
bool Statement::ColumnBool(int column_index) { … }
int Statement::ColumnInt(int column_index) { … }
int64_t Statement::ColumnInt64(int column_index) { … }
double Statement::ColumnDouble(int column_index) { … }
base::Time Statement::ColumnTime(int column_index) { … }
base::TimeDelta Statement::ColumnTimeDelta(int column_index) { … }
std::string Statement::ColumnString(int column_index) { … }
std::u16string Statement::ColumnString16(int column_index) { … }
base::span<const uint8_t> Statement::ColumnBlob(int column_index) { … }
bool Statement::ColumnBlobAsString(int column_index, std::string* result) { … }
bool Statement::ColumnBlobAsString16(int column_index, std::u16string* result) { … }
bool Statement::ColumnBlobAsVector(int column_index,
std::vector<char>* result) { … }
bool Statement::ColumnBlobAsVector(int column_index,
std::vector<uint8_t>* result) { … }
std::string Statement::GetSQLStatement() { … }
SqliteResultCode Statement::CheckSqliteResultCode(
SqliteResultCode sqlite_result_code) { … }
}