Commit Graph

17 Commits

Author SHA1 Message Date
d30042b01a Fixed build error
According to the documentation (but also setup.py) the minimum
required version of MariaDB Connector/C is 3.1.5. Since extended
field_types were added in 3.1,8, we need to check the version
of MariaDB Connector/C.
2020-10-13 08:44:33 +02:00
cbd51decc6 When converting parameters also check subtype of a Python Object 2020-10-02 12:54:21 +02:00
08673bbdf4 Small "workaround" for MDEV-23481:
Don't set the unsigned flag if the value will fit into signed integer.
2020-09-29 14:14:02 +02:00
8ff03334c2 Fixed conversion of Integer parameters:
If bits of PyLong are > 32 we will always use MYSQL_TYPE_LONGLONG.
2020-09-29 13:46:13 +02:00
3f95456824 CONPY-117: Added converter support
The connect() method now accepts an addtional parameter
converter which points to a dictionary, containing one or more conversions.
A conversion must be specified in the form {FIELD_TYOE : conversion_function}
2020-09-29 13:21:13 +02:00
5d4a8d5d62 Fix for CONPY-116: Wrong type reported for SQL type JSON
Beginning of MariaDB 10.5 metadata for JSON columns is stored
in extended field information, and the reported type is MYSQL_TYPE_BLOB.
We now check extended field information to return correct type and for
fetching values in correct format.
2020-09-29 11:43:47 +02:00
6fcb9a5642 more compiler warning fixes 2020-09-19 15:32:50 +02:00
bd560c2bb9 Fix for CONPY-108 (memory leak):
- initialize datetime API only once per object file
- don't reparse same statement
2020-08-29 12:20:52 +02:00
92eaf17fd5 Follow up fix for CONPY-107:
Support also insert/update/delete with PyDateTime_Delta objects
2020-08-16 07:30:58 +02:00
e078e26a18 Fix for CONPY-107:
Since Python is not able to handle negative values, a column defined as TIME will
now be converted to datetime.timedelta instead of datetime.time.
2020-08-15 19:00:40 +02:00
021c4e6aaa Allow different decimal types in executemany():
It is now possible to use different decimal types for the same column
in cursors executemany() method.
2020-08-14 19:55:41 +02:00
067a78dd13 Fix for CONPY68 (jsonfield returning as bytes):
When a value is returned as binary type (BLOB) but has a non binary collation,
it will be converted now as a unicode string and the binary flag will be ignored.
2020-08-10 14:59:16 +02:00
a749c53859 Fix for CONPY-98:
If a string has a binary collation/charset it needs to be converted
to a Binary instead of Unicode.
2020-08-07 14:45:50 +02:00
c59313604e Fix for CONPY-95
Added support for MYSQL_TYPE_BIT: Bit field type will be converted
to PyByte object.
2020-08-06 18:26:44 +02:00
bfd71e2fa1 Fix for CONPY-94:
Don't check for exact type but also for subtype.
2020-08-06 15:03:48 +02:00
01053e0d4a Fix for CONPY-93:
When releasing the GIL we need to unblock/block in callback functions (mariadb_codecs.c)
2020-08-05 18:54:19 +02:00
29b05e3b09 Various fixes and changes for SQLAlchemy support:
- added a thin python wrapper around mariadb module
- added constansts under mariadb.constants (CLIENT, CURSOR, INDICATOR)
- bench and test are now in testing subdirectory
- updated documentation
2020-07-24 12:13:31 +02:00