82 bool IsOpen() const noexcept;
85 bool CheckTableExists(
std::string_view tableName) const;
88 Error Execute(
std::string_view sql) noexcept;
97 template<typename ScalarFunctionType>
99 CreateScalarFunction(
std::
string name, ScalarFunctionType function)
102 std::move(function) };
106 template<
typename StepFunctionType,
typename FinalFunctionType>
108 std::string
name, StepFunctionType stepFunction,
109 FinalFunctionType finalFunction)
112 std::move(stepFunction),
113 std::move(finalFunction) };
118 const std::string& tableName,
const std::string& columnName,
119 int64_t rowId,
bool readOnly,
120 const std::string& databaseName =
"main")
const;
123 explicit operator sqlite3*()
const noexcept;
126 explicit operator bool() const noexcept;
129 Error Close(
bool force) noexcept;
132 std::string_view GetPath(const
char* dbName = {})
const noexcept;
135 Connection(sqlite3* connection,
bool owned)
noexcept;
137 static Error TransactionHandler(
141 sqlite3* mConnection {};
143 std::vector<Transaction*> mPendingTransactions {};
145 bool mInDestructor {};
std::unique_ptr< DBConnection > Connection
A class representing an aggregate function in a SQLite database.
A class representing a connection to a SQLite database.
Connection(const Connection &)=delete
AggregateFunction CreateAggregateFunction(std::string name, StepFunctionType stepFunction, FinalFunctionType finalFunction)
Registers an aggregate function with the given name.
A class representing an error in SQLite.
A class representing a result of an operation.
A class representing a scalar function in a SQLite database.
A class representing a compiled statement.
A class representing a transaction in SQLite.
OpenMode
The mode in which the database should be opened.
ThreadMode
The mode in which the database should be accessed.