Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.1.3, 1.1.2
-
None
-
3.9
Description
Both named_tuple and dictionary are not working with the newer connector, both parameter will just a list of tuples on a fetchall.
Minimal example:
import mariadb |
|
conn_params = {"user": "root", "password": "xxx", "host": "localhost", "database": "myDB"} |
connection = mariadb.connect(**conn_params) |
|
# cursor = connection.cursor(named_tuple=True)
|
cursor = connection.cursor(dictionary=True) |
cursor.execute("SELECT field FROM myTable") |
rows = cursor.fetchall() |
print(rows) |
# will print list of tuples without field names |