OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::connect_fn Struct Reference

Function object to establish a connection to a SQLite database. More...

#include <connection.hpp>

Public Member Functions

connection_ptr operator() (std::filesystem::path const &path, const int aFlags=SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE|SQLITE_OPEN_URI) const

Detailed Description

Function object to establish a connection to a SQLite database.

This function object provides an operator() that takes a filesystem path and optional flags, and returns a connection_ptr representing the established connection to the SQLite database.

Member Function Documentation

◆ operator()()

connection_ptr oxy::connect_fn::operator() ( std::filesystem::path const & path,
const int aFlags = SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE|SQLITE_OPEN_URI ) const
Parameters
path- The filesystem path to the SQLite database file.
aFlags- Optional flags for opening the database (default: SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE | SQLITE_OPEN_URI).
Returns
A connection_ptr representing the established connection to the SQLite database.