Commit Graph

2307 Commits

Author SHA1 Message Date
Mike Bayer b92007da7d Fixed bug in polymorphic SQL generation where multiple joined-inheritance
entities against the same base class joined to each other as well
would not track columns on the base table independently of each other if
the string of joins were more than two entities long.  Also in 0.8.2.
[ticket:2759]
2013-06-15 15:20:48 -04:00
Mike Bayer 02ec9afb15 changelog for this 2013-06-10 20:10:06 -04:00
Mike Bayer ef03ecf606 changelog 2013-06-10 19:42:37 -04:00
Mike Bayer 58c8c4ce77 Fixed bug where sending a composite attribute into :meth:.Query.order_by
would produce a parenthesized expression not accepted by some databases.
[ticket:2754]
2013-06-10 13:50:06 -04:00
Mike Bayer b614a24c5d Fixed the interaction between composite attributes and
the :func:`.aliased` function.  Previously, composite attributes
wouldn't work correctly in comparison operations when aliasing
was applied.  Also in 0.8.2. [ticket:2755]
2013-06-10 13:45:19 -04:00
Chris Withers b2da12e070 Documentation for the new range type support. 2013-06-10 13:24:02 +01:00
Mike Bayer 258d2a8315 - get_unique_constraints() pull request
- version (0.9 for now)
- changelog
- move the test into the test suite so that all dialects can take advantage of it
2013-06-09 17:54:11 -04:00
Mike Bayer 65f5887e9a Added pool logging for "rollback-on-return" and the less used
"commit-on-return".  This is enabled with the rest of pool
"debug" logging.
[ticket:2752]
2013-06-09 16:16:53 -04:00
Mike Bayer f65ddee93a ...and...its a behavioral improvement 2013-06-08 19:50:40 -04:00
Mike Bayer 7ca321155a fix this example 2013-06-08 19:48:10 -04:00
Mike Bayer 5a1d483b33 mention right joins, make it clear we're talking about left outer join as the bigger issue 2013-06-08 19:23:43 -04:00
Mike Bayer 10a672e605 oracle 9 does support this, oracle 8 is a special case. 2013-06-08 19:11:06 -04:00
Mike Bayer 31063d16f2 - tests for the alias() API
- docs docs docs
2013-06-08 18:41:59 -04:00
Mike Bayer c6615b41a6 formatting 2013-06-08 16:14:09 -04:00
Mike Bayer 044582109c changelog 2013-06-08 15:13:39 -04:00
Mike Bayer a80bb53934 - changelog for [ticket:2704]
- use an isinstance() check, concerned a TypeError might be indiscriminate
2013-06-08 14:47:04 -04:00
Mike Bayer a341e1ccc9 also clarified the changelog regarding Cls.scalar != 'value' 2013-06-08 13:39:20 -04:00
Mike Bayer 20d1e9c3fa Added additional criterion to the ==, != comparators, used with
scalar values, for comparisons to None to also take into account
the association record itself being non-present, in addition to the
existing test for the scalar endpoint on the association record
being NULL.  Previously, comparing ``Cls.scalar == None`` would return
records for which ``Cls.associated`` were present and
``Cls.associated.scalar`` is None, but not rows for which
``Cls.associated`` is non-present.  More significantly, the
inverse operation ``Cls.scalar != None`` *would* return ``Cls``
rows for which ``Cls.associated`` was non-present.

Additionally, added a special use case where you
can call ``Cls.scalar.has()`` with no arguments,
when ``Cls.scalar`` is a column-based value - this returns whether or
not ``Cls.associated`` has any rows present, regardless of whether
or not ``Cls.associated.scalar`` is NULL or not.
[ticket:2751]
2013-06-08 13:23:15 -04:00
Mike Bayer d5363fca54 - Fixed an obscure bug where the wrong results would be
fetched when joining/joinedloading across a many-to-many
relationship to a single-table-inheriting
subclass with a specific discriminator value, due to "secondary"
rows that would come back.  The "secondary" and right-side
tables are now inner joined inside of parenthesis for all
ORM joins on many-to-many relationships so that the left->right
join can accurately filtered.
[ticket:2369]
2013-06-07 23:04:33 -04:00
Mike Bayer 555f30d64c When querying the information schema on SQL Server 2000, removed
a CAST call that was added in 0.8.1 to help with driver issues,
which apparently is not compatible on 2000.
The CAST remains in place for SQL Server 2005 and greater.
[ticket:2747]
2013-06-06 12:52:18 -04:00
Mike Bayer ada1927529 The `deferrable keyword argument on :class:.ForeignKey` and
:class:`.ForeignKeyConstraint` will not render the ``DEFERRABLE`` keyword
on the MySQL dialect.  For a long time we left this in place because
a non-deferrable foreign key would act very differently than a deferrable
one, but some environments just disable FKs on MySQL, so we'll be less
opinionated here. [ticket:2721]
2013-06-03 18:33:20 -04:00
Mike Bayer 3a13047fb0 Fixed bug where :class:.MutableDict didn't report a change event
when ``clear()`` was called.
[ticket:2730]
2013-06-03 18:23:23 -04:00
Mike Bayer 8a865a4d1f Fixed bug whereby joining a select() of a table "A" with multiple
foreign key paths to a table "B", to that table "B", would fail
to produce the "ambiguous join condition" error that would be
reported if you join table "A" directly to "B"; it would instead
produce a join condition with multiple criteria.
[ticket:2738]
2013-06-03 17:03:15 -04:00
Mike Bayer ec04620f1f Fixed bug whereby using :meth:.MetaData.reflect across a remote
schema as well as a local schema could produce wrong results
in the case where both schemas had a table of the same name.
[ticket:2728]
2013-06-03 16:40:59 -04:00
Mike Bayer d993bdeac8 - remove the `__iter__()` with notimplemented since it interferes
with legitimate iterable detection, [ticket:2726]
2013-06-03 16:32:12 -04:00
Mike Bayer f8325d9dbb - add changelog/migration note
- inline the label check
2013-06-03 15:38:08 -04:00
Mike Bayer 82c11cc94b - fdb is now official, [ticket:2504]
- restore the rollback cleanup handler, pg8000 is mostly obsolete
as a dialect and the firebird drivers need it
2013-06-03 13:53:42 -04:00
Mike Bayer 832d657854 0.8 changelog in 0.9 2013-05-31 12:00:56 -04:00
Mike Bayer 2cd1a43778 Fixed a regression caused by [ticket:2682] whereby the
evaluation invoked by :meth:`.Query.update` and :meth:`.Query.delete`
would hit upon unsupported ``True`` and ``False`` symbols
which now appear due to the usage of ``IS``.
[ticket:2737]
2013-05-31 11:52:31 -04:00
Mike Bayer 04317bd5a8 The "auto-aliasing" behavior of the :class:.Query.select_from
method has been turned off.  The specific behavior is now
availble via a new method :class:`.Query.select_entity_from`.
[ticket:2736]
2013-05-30 20:09:44 -04:00
Mike Bayer 965b34fa32 - fix up 0.9 links 2013-05-29 22:37:36 -04:00
Mike Bayer e6cafd3596 - version 0.9
- changelog, migration doc
2013-05-29 19:02:17 -04:00
Mike Bayer c62d6203d9 changelog 2013-05-29 18:34:29 -04:00
Mike Bayer 94096593ca Fixed a small bug in the dogpile example where the generation
of SQL cache keys wasn't applying deduping labels to the
statement the same way :class:`.Query` normally does.
2013-05-28 01:22:10 -04:00
Mike Bayer 2eaae08f48 Fixed a bug where the routine to detect the correct kwargs
being sent to :func:`.create_engine` would fail in some cases,
such as with the Sybase dialect.
[ticket:2732]
2013-05-23 12:59:53 -04:00
Mike Bayer cfb0f9ca14 Regression from this ticket caused the unsupported keyword
"true" to render, added logic to convert this to 1/0
for SQL server.
[ticket:2682]
2013-05-15 15:46:29 -04:00
Mike Bayer f574bcf98d Fixed a regression from 0.7 caused by this ticket, which
made the check for recursion overflow in self-referential
eager joining too loose, missing a particular circumstance
where a subclass had lazy="joined" or "subquery" configured
and the load was a "with_polymorphic" against the base.
[ticket:2481]
2013-05-13 16:13:15 -04:00
Mike Bayer 0c4f0f8916 - Fixed a regression from 0.7 where the contextmanager feature
of :meth:`.Session.begin_nested` would fail to correctly
roll back the transaction when a flush error occurred, instead
raising its own exception while leaving the session still
pending a rollback.  [ticket:2718]
2013-04-30 10:02:49 -04:00
Mike Bayer eb431e4aa5 Updated mysqlconnector dialect to check for disconnect based
on the apparent string message sent in the exception; tested
against mysqlconnector 1.0.9.
2013-04-29 19:49:28 -04:00
Mike Bayer 2cf49d898d 0.8.1 2013-04-27 17:27:13 -04:00
Mike Bayer e3a7015f89 Fixes to the `sqlalchemy.ext.serializer` extension, including
that the "id" passed from the pickler is turned into a string
to prevent against bytes being parsed on Py3K, as well as that
``relationship()`` and ``orm.join()`` constructs are now properly
serialized. [ticket:2698] and some other observed issues.
2013-04-26 15:51:29 -04:00
Mike Bayer 22c4ae0aaf changelog for [ticket:2714] 2013-04-26 15:04:42 -04:00
Mike Bayer 7a26ad2ef1 - merge exists() patch + changelog 2013-04-23 20:06:04 -04:00
Mike Bayer 77e0a5dffe Added a conditional to the unpickling process for ORM
mapped objects, such that if the reference to the object
were lost when the object was pickled, we don't
erroneously try to set up _sa_instance_state - fixes
a NoneType error.
2013-04-23 13:23:48 -04:00
Mike Bayer 177ad548c4 - only search in the exception before the first newline, to avoid
false positives for SQL statements containing certain text
2013-04-23 13:07:36 -04:00
Mike Bayer 00c163bfb1 Opened up the checking for "disconnect" with psycopg2/libpq
to check for all the various "disconnect" messages within
the full exception hierarchy.  Specifically the
"closed the connection unexpectedly" message has now been
seen in at least three different exception types.
[ticket:2712]
2013-04-22 19:33:39 -04:00
Mike Bayer 5884c2e7e5 Fully implemented the IS and IS NOT operators with
regards to the True/False constants.  An expression like
``col.is_(True)`` will now render ``col IS true``
on the target platform, rather than converting the True/
False constant to an integer bound parameter.
This allows the ``is_()`` operator to work on MySQL when
given True/False constants.
[ticket:2682]
2013-04-22 19:12:47 -04:00
Mike Bayer d2f8c83e25 - change to [ticket:2681], pre-coerce the array to list
unconditonally instead so that it works in all cases.
2013-04-22 17:08:02 -04:00
Mike Bayer 422f471871 The operators for the Postgresql ARRAY type supports
input types of sets, generators, etc. but only when a dimension
is specified for the ARRAY; otherwise, the dialect
needs to peek inside of "arr[0]" to guess how many
dimensions are in use.  If this occurs with a non
list/tuple type, the error message is now informative
and directs to specify a dimension for the ARRAY.
[ticket:2681]
2013-04-22 16:57:15 -04:00
Mike Bayer e79fd50e58 - changelog
- just do a fetchone() here, no need for len() etc.
2013-04-21 17:23:03 -04:00