Skip to content

Commit 100c931

Browse files
committed
Added docstrings to execute and executemany methods
1 parent 416b975 commit 100c931

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mysql/toolkit/connector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _commit(self):
4444
self._cnx.commit()
4545

4646
def _fetch(self, statement, _print=False):
47-
"""Execute a SQL query and return values."""
47+
"""Execute a SQL query and return a result."""
4848
# Execute statement
4949
self._cursor.execute(statement)
5050
rows = []
@@ -60,9 +60,11 @@ def _fetch(self, statement, _print=False):
6060
return rows[0] if len(rows) == 1 else rows
6161

6262
def execute(self, command):
63+
"""Execute a single SQL query without returning a result."""
6364
self._cursor.execute(command)
6465
self._commit()
6566

6667
def executemany(self, command):
68+
"""Execute multiple SQL queries without returning a result."""
6769
self._cursor.executemany(command)
6870
self._commit()

0 commit comments

Comments
 (0)