Fray Engine
Loading...
Searching...
No Matches
fray::logs::LogStore::Database Struct Reference

Own an SQLite connection and close it on destruction. More...

Public Member Functions

bool close ()
 Closes the connection after any in-flight use completes.
 ~Database ()
 Close the owned SQLite connection if present.

Public Attributes

sqlite3 * db = nullptr
 Owned SQLite handle, or null before opening.
std::filesystem::path path
 Path used when this connection was opened.
std::mutex mutex
 Serializes use and explicit closure of this connection.

Detailed Description

Own an SQLite connection and close it on destruction.

Definition at line 137 of file log_store.hpp.

Constructor & Destructor Documentation

◆ ~Database()

fray::logs::LogStore::Database::~Database ( )
inline

Close the owned SQLite connection if present.

Definition at line 168 of file log_store.hpp.

Member Function Documentation

◆ close()

bool fray::logs::LogStore::Database::close ( )
inline

Closes the connection after any in-flight use completes.

Returns
True if closed; false if SQLite refuses to close it.

Definition at line 151 of file log_store.hpp.

Member Data Documentation

◆ db

sqlite3* fray::logs::LogStore::Database::db = nullptr

Owned SQLite handle, or null before opening.

Definition at line 142 of file log_store.hpp.

◆ mutex

std::mutex fray::logs::LogStore::Database::mutex

Serializes use and explicit closure of this connection.

Definition at line 146 of file log_store.hpp.

◆ path

std::filesystem::path fray::logs::LogStore::Database::path

Path used when this connection was opened.

Definition at line 144 of file log_store.hpp.


The documentation for this struct was generated from the following file: