6#include "SqlConnection.hpp"
7#include "SqlOdbcWide.hpp"
8#include "SqlStatement.hpp"
22 SQLHDBC m_nativeConnection;
28#if defined(_WIN32) || defined(_WIN64)
40#if defined(_WIN32) || defined(_WIN64)
51 m_nativeConnection { hDbc }
57 auto wLogFile = logFile.u16string();
58 SQLSetConnectAttrW(m_nativeConnection, SQL_ATTR_TRACEFILE, detail::AsSqlWChar(wLogFile.data()), SQL_NTS);
59 SQLSetConnectAttrW(m_nativeConnection, SQL_ATTR_TRACE, (SQLPOINTER) SQL_OPT_TRACE_ON, SQL_IS_UINTEGER);
69 SQLSetConnectAttrW(m_nativeConnection, SQL_ATTR_TRACE, (SQLPOINTER) SQL_OPT_TRACE_OFF, SQL_IS_UINTEGER);
Represents a connection to a SQL database.
Enables protocol-level ODBC trace logging for the given connection.
SqlScopedTraceLogger(SQLHDBC hDbc, std::filesystem::path const &logFile)
Constructs a scoped trace logger for the given native ODBC handle, logging to the specified file.
SqlScopedTraceLogger(SqlStatement &stmt)
Constructs a scoped trace logger for the given SQL statement, logging to standard output.
SqlScopedTraceLogger(SqlConnection &connection)
Constructs a scoped trace logger for the given SQL connection, logging to standard output.
High level API for (prepared) raw SQL statements.
One column pair of a composite foreign key: "this record's column references that one".