MySQL Connector/Python Release Notes
MySQL Connector/Python 2.2.1 has Protobuf 3 as a prerequisite, and is available
in fewer distribution formats than usual (RPM and
tar.gz
packages only).
Views can now be accessed like tables:
Schema.get_tables()
now also returns a
Table
object for each existing
View
.
Schema.get_table(name)
now also returns a
Table
object if the given name is a
View
.
All the operations available through a
Table
object are also available if the
underlying object is a View
. (The client
will not do any validation in this regard.)
A new Table.is_view()
method determines
whether the underlying object is a View
.
The Collection.add([]).execute()
construct
now is treated as a no-operation and does not return an error.
This is true even if there is no connection to the server or the
collection does not exist on the server. The reasoning is that a
request to add nothing to something that does not exist is
trivially fulfilled.
Connector/Python now implements support for these X DevAPI features:
Client failover
URI type string connections. See Connecting to the Server Using URI-Like Strings or Key-Value Pairs.
References: See also: Bug #23550057.
A new get_default_schema()
method retrives a
Schema
object from the current session, given
the schema name configured in the connection settings. For
example, if the connection string is
"mysqlx://user:@127.0.0.1:33060/my_schema"
,
session.get_default_schema()
returns a
Schema
object for
my_schema
.
Protobuf support was upgraded from Protobuf 2 to Protobuf 3 (which means that Protobuf3 is now a prerequsite for Connector/Python).