6#include "SqlConnection.hpp"
7#include "SqlStatement.hpp"
21 SQLHDBC m_nativeConnection;
27#if defined(_WIN32) || defined(_WIN64)
39#if defined(_WIN32) || defined(_WIN64)
50 m_nativeConnection { hDbc }
52 SQLSetConnectAttrA(m_nativeConnection, SQL_ATTR_TRACEFILE, (SQLPOINTER) logFile.string().c_str(), SQL_NTS);
53 SQLSetConnectAttrA(m_nativeConnection, SQL_ATTR_TRACE, (SQLPOINTER) SQL_OPT_TRACE_ON, SQL_IS_UINTEGER);
63 SQLSetConnectAttrA(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.