@@ -54,7 +54,7 @@ def query(
5454 The type of row values depends on the database module -
5555 usually they are tuples or tuple-like objects.
5656
57- Set ``no_transaction`` to _True_ to run command without explicit transaction rollback in case of error.
57+ Set ``no_transaction`` to _True_ to run command without explicit transaction commit or rollback in case of error.
5858 See `Commit behavior` for details.
5959
6060 Set ``return_dict`` to _True_ to explicitly convert the return values into list of dictionaries.
@@ -89,6 +89,7 @@ def query(
8989 omit_trailing_semicolon = db_connection .omit_trailing_semicolon ,
9090 )
9191 all_rows = cur .fetchall ()
92+ self ._commit_if_needed (db_connection , no_transaction )
9293 col_names = [c [0 ] for c in cur .description ]
9394 self ._log_query_results (col_names , all_rows )
9495 if return_dict :
@@ -111,7 +112,7 @@ def row_count(
111112 """
112113 Runs a query with the ``select_statement`` and returns the number of rows in the result.
113114
114- Set ``no_transaction`` to _True_ to run command without explicit transaction rollback in case of error.
115+ Set ``no_transaction`` to _True_ to run command without explicit transaction commit or rollback in case of error.
115116 See `Commit behavior` for details.
116117
117118 Use ``alias`` to specify what connection should be used if `Handling multiple database connections`.
@@ -143,6 +144,7 @@ def row_count(
143144 omit_trailing_semicolon = db_connection .omit_trailing_semicolon ,
144145 )
145146 data = cur .fetchall ()
147+ self ._commit_if_needed (db_connection , no_transaction )
146148 col_names = [c [0 ] for c in cur .description ]
147149 if db_connection .module_name in ["sqlite3" , "ibm_db" , "ibm_db_dbi" , "pyodbc" , "jaydebeapi" ]:
148150 current_row_count = len (data )
@@ -168,7 +170,7 @@ def description(
168170 """
169171 Runs a query with the ``select_statement`` to determine the table description.
170172
171- Set ``no_transaction`` to _True_ to run command without explicit transaction rollback in case of error.
173+ Set ``no_transaction`` to _True_ to run command without explicit transaction commit or rollback in case of error.
172174 See `Commit behavior` for details.
173175
174176 Use ``alias`` to specify what connection should be used if `Handling multiple database connections`.
@@ -199,6 +201,7 @@ def description(
199201 parameters = parameters ,
200202 omit_trailing_semicolon = db_connection .omit_trailing_semicolon ,
201203 )
204+ self ._commit_if_needed (db_connection , no_transaction )
202205 description = list (cur .description )
203206 if sys .version_info [0 ] < 3 :
204207 for row in range (0 , len (description )):
0 commit comments