Lightweight 0.20260303.0
Loading...
Searching...
No Matches
Lightweight::SqlConnectionDataSource Struct Reference

Represents a connection data source as a DSN, username, password, and timeout. More...

#include <SqlConnectInfo.hpp>

Public Member Functions

LIGHTWEIGHT_API SqlConnectionString ToConnectionString () const
 Converts this data source to an ODBC connection string.
 
auto operator<=> (SqlConnectionDataSource const &) const noexcept=default
 Three-way comparison operator.
 

Static Public Member Functions

static LIGHTWEIGHT_API SqlConnectionDataSource FromConnectionString (SqlConnectionString const &value)
 Constructs a SqlConnectionDataSource from the given connection string.
 

Public Attributes

std::string datasource
 The ODBC data source name (DSN).
 
std::string username
 The username for authentication.
 
std::string password
 The password for authentication.
 
std::chrono::seconds timeout { 5 }
 The connection timeout duration.
 

Detailed Description

Represents a connection data source as a DSN, username, password, and timeout.

Definition at line 41 of file SqlConnectInfo.hpp.

Member Function Documentation

◆ ToConnectionString()

LIGHTWEIGHT_API SqlConnectionString Lightweight::SqlConnectionDataSource::ToConnectionString ( ) const
inline

Converts this data source to an ODBC connection string.

Definition at line 56 of file SqlConnectInfo.hpp.

References Lightweight::SqlConnectionString::value.

Member Data Documentation

◆ datasource

std::string Lightweight::SqlConnectionDataSource::datasource

The ODBC data source name (DSN).

Definition at line 44 of file SqlConnectInfo.hpp.

◆ username

std::string Lightweight::SqlConnectionDataSource::username

The username for authentication.

Definition at line 46 of file SqlConnectInfo.hpp.

◆ password

std::string Lightweight::SqlConnectionDataSource::password

The password for authentication.

Definition at line 48 of file SqlConnectInfo.hpp.

◆ timeout

std::chrono::seconds Lightweight::SqlConnectionDataSource::timeout { 5 }

The connection timeout duration.

Definition at line 50 of file SqlConnectInfo.hpp.


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