Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.0.0
Description
When creating a subtype of int, it can't be used in execute()/executemany() methods:
The following snippet
import mariadb |
|
class foo(int): |
def bar(self):pass |
|
x=foo(2) |
|
conn=mariadb.connect(db="test") |
cursor=conn.cursor() |
cursor.execute("SELECT ?", (x,)) |
fails with
Traceback (most recent call last):
|
File "x.py", line 10, in <module>
|
cursor.execute("SELECT ?", (x,))
|
mariadb.DatabaseError.DataError: Data type 'foo' in column 0 not supported in MariaDB Connector/Python
|