Instead of OperationalException and IntegrityException will be raised
for the following eror types:
ER_BAD_NULL_ERROR, ER_DATA_OUT_OF_RANGE, ER_CONSTRAINT_FAILED, ER_DUP_CONSTRAINT_NAME
When creating a cursor with result set type named_tuple
or dictionary, references were not decremented correctly.
For named tuples we don't use a static variable anymore, instead
of it will be created by PyStructSequence_NewType.
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}
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.
rowcount:
In case of an error, or if statement wasn't executed rowcount should be -1 (see PEP-249)
For DML statements the number of affected rows returned in OK packet by server:
> 0 for DML statements which modify or insert, e.g. ALTER TABLE or CREATE TABLE .. SELECT FROM
otherwise 0
For DQL statement
if field_count > 0: number of rows returned
otherwise affected rows returned in OK packet by server.
lastrowid:
if server returns no value (0) for last_insert_id, lastrowid should be None.
if last_insert_id is > 0, return it's value
Add option binary for cursor. When set to true cursor will always try
to use the client/server binary protocol, even when no parameter were
passed to execute.
Fixed default behavior of autocommit: If not autocommit mode was specified,
autocommit will be off by default (see https://www.python.org/dev/peps/pep-0249/#commit).
Added new keyword autocommit for connection class which might have the following values:
- None: use server default setting
- True: turns autocommit on
- False: turns autocommit off
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.
- 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