136 :
SQLite3(PathText(dbfile), logger, Utf8Path{}) {}
144 :
SQLite3(PathText(dbfile), logger, Utf8Path{}) {}
179 const auto text = path.u8string();
190 bool DoConnect() noexcept override;
195 void DoPreDisconnect() noexcept override;
200 void DoDisconnect() noexcept override;
205 void DoPostDisconnect() noexcept override;
219 void DoBeginTransaction(IsolationLevel level) override;
Database(const StormByte::Safe::Shared< Logger::Log > &logger)
Construct with an optional logger.
SQLite3 backend.
Definition sqlite3.hxx:79
bool SilentQuery(std::string_view query) noexcept override
Execute a query that does not return rows.
SQLite3 & operator=(const SQLite3 &db)=delete
Copy assignment (deleted).
bool DoSilentQuery(std::string_view query) noexcept override
Internal silent query.
SQLite3 & operator=(SQLite3 &&db) noexcept
Move assignment that transfers the database connection.
void EnableForeignKeys()
Enable foreign keys (off by default in SQLite).
SQLite3(const SQLite3 &db)=delete
Copy constructor (deleted).
~SQLite3() noexcept override
Destructor.
ExpectedRows Query(std::string_view query) noexcept override
Execute a query that returns rows.
SQLite3(SQLite3 &&db) noexcept
Move constructor that transfers the database connection.
SQLite3(std::filesystem::path &&dbfile, const StormByte::Safe::Shared< Logger::Log > &logger)
File-backed database (moved path and logger).
Definition sqlite3.hxx:143
STORMBYTE_DECLARE_MAYBE_SAFE(StormByte::Logger::Exception)
SQLite backend of the Database module.
Database module of the StormByte suite.
Expected< Rows, QueryException > ExpectedRows
Query result: Rows or QueryException.
Definition typedefs.hxx:81
Root namespace of the StormByte C++ suite.
Private opaque holder for the native MariaDB connection.
#define STORMBYTE_DATABASE_PRIVATE
Definition visibility.h:57
#define STORMBYTE_DATABASE_PUBLIC
Definition visibility.h:54