Mike Bayer [Fri, 3 Jun 2016 19:07:14 +0000 (15:07 -0400)]
Ensure 'options' is always present in foreign key info
Regarding 0e88bcc30ed49193b91f248123f526fa30007f22, "options"
needs to be present as a key in the dictionary because Alembic
uses this as a guide to know if the backend is even capable of
reporting on foreign key options.
Mike Bayer [Thu, 2 Jun 2016 17:52:27 +0000 (13:52 -0400)]
Skip UniqueConstraint marked by unique=True in tometadata
Fixes an issue where a Column would be copied with unique=True
and at the same time the UniqueConstraint would also be copied,
leading to duplicate UniqueConstraints in the target table,
when tometadata() is used. Imitates the same logic used
by index=True/Index to avoid duplicates. For some reason
a fix was implemented for Index long ago but never for
UniqueConstraint.
Sheila Allen [Mon, 11 Apr 2016 19:29:03 +0000 (15:29 -0400)]
Use new mxODBC 3.3.4 varbinary null symbol
Use new mxODBC 3.3.4 varbinary null symbol with VARBINARY
data types when value is None(based on similar change to pyodbc).
Fix a test to pass on mxODBC starting w 3.3.3 version
Adam Chainz [Sun, 29 May 2016 13:28:55 +0000 (14:28 +0100)]
Convert readthedocs link for their .org -> .io migration for hosted projects
As per their email ‘Changes to project subdomains’:
> Starting today, Read the Docs will start hosting projects from subdomains on the domain readthedocs.io, instead of on readthedocs.org. This change addresses some security concerns around site cookies while hosting user generated data on the same domain as our dashboard.
Test Plan: Manually visited all the links I’ve modified.
Mike Bayer [Wed, 18 May 2016 15:07:02 +0000 (11:07 -0400)]
Support "blank" schema when MetaData.schema is set
Previously, it was impossible to have a Table that has
None for a schema name when the "schema" parameter on
MetaData was set. A new symbol sqlalchemy.schema.BLANK_SCHEMA
is added which indicates that the schema name should unconditionally
be set to None. In particular, this value must be passed within
cross-schema foreign key reflection, so that a Table which
is in the "default" schema can be represented properly.
Mike Bayer [Mon, 16 May 2016 14:32:07 +0000 (10:32 -0400)]
Accommodate "callable" bound param in evaluator
Fixed bug in "evaluate" strategy of :meth:`.Query.update` and
:meth:`.Query.delete` which would fail to accommodate a bound
parameter with a "callable" value, as which occurs when filtering
by a many-to-one equality expression along a relationship.
John Vandenberg [Thu, 5 May 2016 13:26:00 +0000 (09:26 -0400)]
Fix TypeError during cx_Oracle connection
cx_Oracle connection parameters user, password and dsn must be
either a string or NULL. When they are passed a Python None object,
"TypeError: expecting string, unicode or buffer object" is raised.
Mike Bayer [Tue, 10 May 2016 16:49:56 +0000 (12:49 -0400)]
Fix label referencing in SQL Server OFFSET logic
Fixed bug where by ROW_NUMBER OVER clause applied for OFFSET
selects in SQL Server would inappropriately substitute a plain column
from the local statement that overlaps with a label name used by
the ORDER BY criteria of the statement.
Mike Bayer [Tue, 10 May 2016 15:05:30 +0000 (11:05 -0400)]
Check for duplicate calls to register_attribute_impl
Fixed bug whereby the event listeners used for backrefs could
be inadvertently applied multiple times, when using a deep class
inheritance hierarchy in conjunction with mutiple mapper configuration
steps.
Mike Bayer [Thu, 5 May 2016 21:07:40 +0000 (17:07 -0400)]
Repair _orm_columns() to accommodate text()
Fixed bug whereby passing a :func:`.text` construct to the
:meth:`.Query.group_by` method would raise an error, instead
of intepreting the object as a SQL fragment.
Mike Bayer [Wed, 27 Apr 2016 16:37:58 +0000 (11:37 -0500)]
Don't double-process ResultMetaData for BufferedColumnResultProxy
Fixed a bug in the result proxy used mainly by Oracle when binary and
other LOB types are in play, such that when query / statement caching
were used, the type-level result processors, notably that required by
the binary type itself but also any other processor, would become lost
after the first run of the statement due to it being removed from the
cached result metadata.
Mike Bayer [Wed, 27 Apr 2016 00:00:43 +0000 (19:00 -0500)]
Simplify directed graph example
Changed the "directed graph" example to no longer consider
integer identifiers of nodes as significant; the "higher" / "lower"
references now allow mutual edges in both directions.
Mike Bayer [Thu, 21 Apr 2016 14:36:19 +0000 (10:36 -0400)]
Fix result set handling for case insensitive dupe cols
Fixed bug where when using ``case_sensitive=False`` with an
:class:`.Engine`, the result set would fail to correctly accomodate
for duplicate column names in the result set, causing an error
when the statement is executed in 1.0, and preventing the
"ambiguous column" exception from functioning in 1.1.
Mike Bayer [Tue, 19 Apr 2016 20:11:23 +0000 (16:11 -0400)]
Deprecate Mapper.order_by
This is an old parameter no longer relevant to how SQLAlchemy
works, once the Query object was introduced. By deprecating it
we establish that we aren't supporting non-working use cases
and that we encourage applications to move off of the use of this
parameter.
Mike Bayer [Tue, 19 Apr 2016 19:46:37 +0000 (15:46 -0400)]
Rename Query._mapper_zero() to Query._entity_zero()
To be more descriptive of the use of _mapper_zero(), rename
it to _entity_zero(), but also supply a new _mapper_zero() function
that more strictly returns a mapper. The existing
_entity_zero() function is renamed to _query_entity_zero.
_only_mapper_zero() is removed as it isn't used. Divide up the
existing calling functions to refer to the appropriate new method.
Mike Bayer [Mon, 18 Apr 2016 20:18:31 +0000 (16:18 -0400)]
Propagate hybrid properties / info
Keystone and others depend on the .property attribute being
"mirrored" when a @hybrid_property is linked directly to a
mapped attribute. Restore this linkage and also create a defined
behavior for the .info dictionary; it is that of the hybrid itself.
Add this behavioral change to the migration notes.
Mike Bayer [Sun, 10 Apr 2016 18:56:01 +0000 (14:56 -0400)]
Honor hybrid property / method docstrings
The docstring specified on a hybrid property or method is now honored
at the class level, allowing it to work with tools like Sphinx
autodoc. The mechanics here necessarily involve some wrapping of
expressions to occur for hybrid properties, which may cause them
to appear differently using introspection.
Mike Bayer [Wed, 30 Mar 2016 21:27:53 +0000 (17:27 -0400)]
- make sure negative row indexes are based on the size of the
number of columns we're actually reporting on
- add more tests for negative row index
- changelog/migration
Mike Bayer [Tue, 29 Mar 2016 21:56:02 +0000 (17:56 -0400)]
- Added :meth:`.Select.lateral` and related constructs to allow
for the SQL standard LATERAL keyword, currently only supported
by Postgresql. fixes #2857
Mike Bayer [Wed, 23 Mar 2016 20:54:03 +0000 (16:54 -0400)]
- Further continuing on the common MySQL exception case of
a savepoint being cancelled first covered in :ticket:`2696`,
the failure mode in which the :class:`.Session` is placed when a
SAVEPOINT vanishes before rollback has been improved to allow the
:class:`.Session` to still function outside of that savepoint.
It is assumed that the savepoint operation failed and was cancelled.
fixes #3680