Lightweight 0.20261105.1
Loading...
Searching...
No Matches
Lightweight::SqliteConnectInfo Struct Reference

What a connection to a SQLite database is opened from through the native SQLite3 driver. More...

#include <SqlConnectInfo.hpp>

Public Member Functions

bool operator== (SqliteConnectInfo const &) const =default
 Equality comparison operator.
 

Public Attributes

std::string database
 
SqliteOpenFlags flags = SqliteOpenFlags::ReadWrite | SqliteOpenFlags::Create
 How the database is opened.
 
std::optional< SqliteConnectionSettings > settings {}
 

Detailed Description

What a connection to a SQLite database is opened from through the native SQLite3 driver.

Plain data that exists in every build, so naming it needs no conditional compilation: connecting from it succeeds only in a build whose enabled drivers include one that connects from it, and otherwise fails with SQLSTATE IM001 (see SqlConnection::Connect(SqliteConnectInfo const&)).

Definition at line 216 of file SqlConnectInfo.hpp.

Member Data Documentation

◆ database

std::string Lightweight::SqliteConnectInfo::database

The database: a file path (UTF-8), ":memory:", or a file: URI together with SqliteOpenFlags::Uri. Without that flag a name starting with file: is not a URI: it is opened as a plain file of that name, on every SQLite build.

Definition at line 221 of file SqlConnectInfo.hpp.

◆ flags

SqliteOpenFlags Lightweight::SqliteConnectInfo::flags = SqliteOpenFlags::ReadWrite | SqliteOpenFlags::Create

How the database is opened.

Definition at line 224 of file SqlConnectInfo.hpp.

◆ settings

std::optional<SqliteConnectionSettings> Lightweight::SqliteConnectInfo::settings {}

When set, replaces the connection's SQLite settings at Connect (see SqlConnection::SqliteSettings()); when unset, the connection keeps its own.

Definition at line 228 of file SqlConnectInfo.hpp.


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