Lightweight 0.20260625.0
Loading...
Searching...
No Matches
Core API

The low-level SQL API: connections, statements, result cursors and transactions. More...

Classes

struct  Lightweight::SqlConnectionString
 
struct  Lightweight::SqlConnectionDataSource
 
class  Lightweight::SqlConnection
 Represents a connection to a SQL database. More...
 
struct  Lightweight::SqlErrorInfo
 Represents an ODBC SQL error. More...
 
class  Lightweight::SqlLogger
 
struct  Lightweight::SqlSchema::Column
 
struct  Lightweight::SqlSchema::Table
 
class  Lightweight::SqlScopedLock
 
class  Lightweight::SqlStatement
 High level API for (prepared) raw SQL statements. More...
 
class  Lightweight::SqlResultCursor
 
class  Lightweight::SqlTransactionException
 
class  Lightweight::SqlTransaction
 

Enumerations

enum class  Lightweight::SqlEncryptionMode : std::uint8_t { SqlEncryptionMode::DriverDefault = 0 , SqlEncryptionMode::Disabled = 1 , SqlEncryptionMode::Enabled = 2 }
 Whether the client/server connection is TLS-encrypted. More...
 

Detailed Description

The low-level SQL API: connections, statements, result cursors and transactions.

This is the thin layer directly over ODBC. Use it when you want to write SQL yourself and keep full control over binding and fetching. The higher-level Data Mapper and Query Builder layers are built on top of these types and interoperate with them.

Enumeration Type Documentation

◆ SqlEncryptionMode

enum class Lightweight::SqlEncryptionMode : std::uint8_t
strong

Whether the client/server connection is TLS-encrypted.

Maps onto the Microsoft SQL Server ODBC connection attribute SQL_COPT_SS_ENCRYPT, which must be set on the connection handle before connecting. This is the only way to request encryption on the DSN-based connect path (SQLConnect), where there is no connection string for an Encrypt= keyword to live in.

See also
https://learn.microsoft.com/en-us/sql/relational-databases/native-client-odbc-api/sqlsetconnectattr
Enumerator
DriverDefault 

Leave the attribute untouched — whatever the driver, DSN, or connection string configures wins.

This is the default, so an application that does not opt in behaves exactly as before. 
Disabled 

Request an unencrypted connection (SQL_EN_OFF).

Enabled 

Request an encrypted connection (SQL_EN_ON).

Definition at line 37 of file SqlConnectInfo.hpp.