Skip to content

Commit aad1e22

Browse files
Saumya Garggargsaumya
authored andcommitted
removed unnecessary prints
1 parent be946d0 commit aad1e22

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

mssql_python/pybind/connection/connection.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ SQLRETURN Connection::setAutocommit(bool enable) {
9595
throw std::runtime_error("Connection handle not allocated");
9696
}
9797
SQLINTEGER value = enable ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF;
98-
LOG("Set SQL Connection Attribute");
98+
LOG("Set SQL Connection Attribute - Autocommit");
9999
SQLRETURN ret = SQLSetConnectAttr_ptr(_dbc_handle->get(), SQL_ATTR_AUTOCOMMIT, (SQLPOINTER)value, 0);
100100
if (!SQL_SUCCEEDED(ret)) {
101101
throw std::runtime_error("Failed to set autocommit mode.");
@@ -167,7 +167,7 @@ SqlHandlePtr Connection::allocStatementHandle() {
167167
}
168168

169169
SQLRETURN Connection::set_attribute(SQLINTEGER attribute, py::object value) {
170-
LOG("Setting SQL attribute {}");
170+
LOG("Setting SQL attribute");
171171

172172
SQLPOINTER ptr = nullptr;
173173
SQLINTEGER length = 0;
@@ -188,7 +188,10 @@ SQLRETURN Connection::set_attribute(SQLINTEGER attribute, py::object value) {
188188

189189
SQLRETURN ret = SQLSetConnectAttr_ptr(_dbc_handle->get(), attribute, ptr, length);
190190
if (!SQL_SUCCEEDED(ret)) {
191-
LOG("Failed to set attribute {}");
191+
LOG("Failed to set attribute");
192+
}
193+
else {
194+
LOG("Set attribute successfully");
192195
}
193196
return ret;
194197
}

0 commit comments

Comments
 (0)