|
Lightweight 0.20261023.0
|
The low-level SQL API: connections, statements, result cursors and transactions. More...
Functions | |
| LIGHTWEIGHT_API std::string_view | Lightweight::ToStringView (SqlStatisticsOperation operation) noexcept |
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.
|
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.
Definition at line 50 of file SqlConnectInfo.hpp.
|
strong |
How a connection treats a string or binary value written into a column too small to hold it.
The mode is applied per connection. On Microsoft SQL Server it is realised by toggling the session's ANSI_WARNINGS setting when the connection is established.
| Enumerator | |
|---|---|
| Truncate | The value is silently shortened to the column width (
|
| Error | The server rejects the write with an error ( |
Definition at line 52 of file SqlConnection.hpp.
|
strong |
The SQLite journal mode a connection requests when it is established.
Each enumerator other than Unchanged maps onto the matching PRAGMA journal_mode value. See https://sqlite.org/pragma.html#pragma_journal_mode for the semantics of each mode.
MEMORY or OFF, so asking it for Wal leaves it in MEMORY. Definition at line 78 of file SqlConnection.hpp.
|
strong |
How a connection relates to its ODBC handles.
| Enumerator | |
|---|---|
| Owned | The connection allocated its handles, connects them and frees them on Close(). |
| Borrowed | Another component allocated and connected the handle and keeps owning it; the connection only runs statements on it (see SqlConnection::Borrow). |
Definition at line 136 of file SqlConnection.hpp.
|
strong |
Whether a single SqlStatement takes part in its connection's prepared-statement cache.
Statements opt in by default, which only has an effect once the owning connection was given a non-zero cache capacity (see SqlConnection::SetPreparedStatementCacheCapacity). Individual call sites that must not reuse a plan — for instance a statement that straddles a schema change — opt out via SqlStatement::SetPreparedStatementCaching.
| Enumerator | |
|---|---|
| Enabled | Reuse a pooled handle when one matches, and hand the handle back to the pool afterwards. |
| Disabled | Never take a handle from, nor give one to, the connection's cache. |
Definition at line 30 of file SqlPreparedStatementCache.hpp.
|
strong |
Identifies the operation class a statistics sample belongs to.
The enumerators are contiguous and Count is the array extent used by SqlStatisticsSnapshot — this is the data-driven table key, not a switch-ladder discriminator.
| Enumerator | |
|---|---|
| Execute |
|
| ExecuteDirect |
|
| ExecuteBatch |
|
| Prepare |
|
| Fetch | Row / block retrieval ( @note The library does not currently time its fetch paths, so this slot reads back zero unless your own code records into it. Row throughput is reported instead by @ref SqlStatisticsSnapshot::rowsFetched and @ref SqlStatisticsSnapshot::blockFetches. |
| PoolAcquire | Connection acquisition from a Pool. |
| Count | Number of enumerators; not an operation itself. |
Definition at line 41 of file SqlStatistics.hpp.
|
noexcept |
Human-readable name of an operation class, for exporters and log output.
| operation | The operation to name. |
"Execute"), or "Unknown" for an out-of-range value.