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 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);