Similiar to description property, this property returns
a dictionary with complete metadata.
The dictionary contains the following keys:
- catalog: catalog (always 'def')
- schema: current schema
- field: alias column name or if no alias was specified
column name
- org_field: original column name
- table: alias table name or if no alias was specified
table name
- org_table: original table name
- type: column type
- charset: character set (utf8mb4 or binary)
- length: The length of the column
- max length: The maximum length of the column
- decimals: The numer of decimals
- flags: Flags (flags are defined in constants.FIELD_FLAG)
- ext_type: Extended data type (types are defined in
constants.EXT_FIELD_TYPE)
This fixes also CONPY-270: Instead of checking BINARY_FLAG we now
check character set for binary object types.
Even if PEP-249 permits operations on a closed cursor, we don't
raise an exception if the cursor or the underlying connection
was closed. Instead rowcount property will return -1.
This is a workaround for pandas, where rowcount will be checked
after the cursor was closed.
Fix indexing when moving a free connection to used connections
to avoid returning the same connection twice.
Kudos and thanks to G.Mech for reporting this bug and providing
the fix.
For backwards compatibility PyLong_FromString interprets leading
zeros as octal value which will end up in a value error, if the
number contains 2 or more leading zeros.
The connection method now offers the option of specifying
the version of the TLS protocol using tls_version:
connection = mariadb.connect(tls_protocol="TLSv1.2")
With implementation of CONPY-246/247 pool._connections was replaced
by _connections_used and _connections_free to the size should be
calclulated as len(_connections_used + _connections_free)
Added optional parameter "pool_invalidation_interval",
which specifies the validation interval in milliseconds
after which the status of a connection requested from
the pool is checked.
The default values is 500 milliseconds, a value of 0
means that the status will always be checked.
Instead of iterating through all connections and checking the health
status via ping, used and unused connections were separated in different
lists. This ensures that the last used connection will be always the first.
If an error occured during module initialization, the exception
now contains more information about possible cause and doesn't
overwrite existing error message.
Replaced collections.named_tuple by C-Pythons PyStruct_Sequence.
All conversion are done now before fetching a row: converting to
other result types than tuple (named tuple or dict) now have less
overhead and are significantly faster.