From a0b11b666e65692cdd56eab8d4de2bd99021640a Mon Sep 17 00:00:00 2001 From: Saumya Garg Date: Tue, 20 May 2025 19:38:19 +0530 Subject: [PATCH 1/2] add library and include directories --- mssql_python/pybind/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mssql_python/pybind/CMakeLists.txt b/mssql_python/pybind/CMakeLists.txt index 1c226f0c..dceb2efc 100644 --- a/mssql_python/pybind/CMakeLists.txt +++ b/mssql_python/pybind/CMakeLists.txt @@ -90,7 +90,13 @@ execute_process( ) # Add module library -add_library(ddbc_bindings MODULE ddbc_bindings.cpp) +add_library(ddbc_bindings MODULE ddbc_bindings.cpp connection/connection.cpp) + +# Add include directories for your project +target_include_directories(ddbc_bindings PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} # Root directory (for ddbc_bindings.h) + ${CMAKE_CURRENT_SOURCE_DIR}/connection # connection directory (for connection.h) +) # Set the output name to include Python version and architecture set_target_properties(ddbc_bindings PROPERTIES From e798d98ae8f733712e3a478933bb045762e65bf7 Mon Sep 17 00:00:00 2001 From: Saumya Garg Date: Wed, 21 May 2025 13:41:07 +0530 Subject: [PATCH 2/2] removing this function, and will add it in pooling PR --- mssql_python/pybind/connection/connection.cpp | 4 ---- mssql_python/pybind/connection/connection.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/mssql_python/pybind/connection/connection.cpp b/mssql_python/pybind/connection/connection.cpp index b6e07d56..fb6e3968 100644 --- a/mssql_python/pybind/connection/connection.cpp +++ b/mssql_python/pybind/connection/connection.cpp @@ -39,10 +39,6 @@ SQLRETURN Connection::rollback() { // to be added } -SQLRETURN Connection::end_transaction(SQLSMALLINT completion_type) { - // to be added -} - SQLRETURN Connection::set_autocommit(bool enable) { LOG("Setting autocommit mode"); // to be added diff --git a/mssql_python/pybind/connection/connection.h b/mssql_python/pybind/connection/connection.h index f06b584f..cd56dda8 100644 --- a/mssql_python/pybind/connection/connection.h +++ b/mssql_python/pybind/connection/connection.h @@ -30,9 +30,6 @@ class Connection { // Rollback the current transaction. SQLRETURN rollback(); - // End the transaction with the specified completion type. - SQLRETURN end_transaction(SQLSMALLINT completion_type); - // Enable or disable autocommit mode. SQLRETURN set_autocommit(bool value);