Released: March 4, 2019
[feature] [schema] Added new parameters
MetaData.reflect.resolve_fkswhich when set to False will
disable the automatic reflection of related tables encountered in
ForeignKeyobjects, which can both reduce SQL overhead for omitted
tables as well as avoid tables that can't be reflected for database-specific
Tableobjects present in the same
collection can still refer to each other even if the reflection of the two
tables occurred separately.
[feature] [orm] The
Query.get()method can now accept a dictionary of attribute keys
and values as a means of indicating the primary key value to load; is
particularly useful for composite primary keys. Pull request courtesy
[feature] [orm] A SQL expression can now be assigned to a primary key attribute for an ORM
flush in the same manner as ordinary attributes as described in
flush_embedded_sql_expressionswhere the expression will be evaulated
and then returned to the ORM using RETURNING, or in the case of pysqlite,
works using the cursor.lastrowid attribute.Requires either a database that
supports RETURNING (e.g. Postgresql, Oracle, SQL Server) or pysqlite.
[bug] [sql] The
Aliasclass and related subclasses
TableSamplehave been reworked so that it is
not possible for a user to construct the objects directly. These constructs
require that the standalone construction function or selectable-bound method
be used to instantiate new objects.
[engine] [feature] Revised the formatting for
StatementErrorwhen stringified. Each
error detail is broken up over multiple newlines instead of spaced out on a
single line. Additionally, the SQL representation now stringifies the SQL
statement rather than using
repr(), so that newlines are rendered as is.
Pull request courtesy Nate Clark.