|
ORE Studio 0.0.4
|
SQLite database context for connection management. More...
#include <sqlite_context.hpp>

Public Types | |
| using | connection_type = sqlgen::sqlite::Connection |
| using | connection_ref = sqlgen::Ref< connection_type > |
Public Member Functions | |
| sqlite_context (std::filesystem::path db_path) | |
| Construct context with database file path. | |
| rfl::Result< connection_ref > | connect () const |
| Get a connection to the SQLite database. | |
| const std::filesystem::path & | db_path () const |
| Get the database file path. | |
| void | initialize_schema () |
| Initialize the database schema if it doesn't exist. | |
| void | purge_all_data () |
| Delete all data from all tables. | |
SQLite database context for connection management.
Provides a simple connection context for the local SQLite database that stores server environment bookmarks, folders, and tags.
|
explicit |
Construct context with database file path.
| db_path | Path to the SQLite database file. |
| rfl::Result< sqlite_context::connection_ref > connect | ( | ) | const |
Get a connection to the SQLite database.

| void purge_all_data | ( | ) |
Delete all data from all tables.
Efficiently purges the database using bulk DELETE statements. Tables are deleted in order to respect foreign key constraints.
