Commit Graph

8758 Commits

Author SHA1 Message Date
Mike Bayer ceaa6047ef - More fixes to SQLite "join rewriting"; the fix from 🎫2967
implemented right before the release of 0.9.3 affected the case where
a UNION contained nested joins in it.   "Join rewriting" is a feature
with a wide range of possibilities and is the first intricate
"SQL rewriting" feature we've introduced in years, so we're sort of
going through a lot of iterations with it (not unlike eager loading
back in the 0.2/0.3 series, polymorphic loading in 0.4/0.5). We should
be there soon so thanks for bearing with us :).
fixes #2969   re: #2967
- solve the issue of join rewriting inspecting various types of
from objects without using isinstance(), by adding some new
underscored inspection flags to the FromClause hierarchy.
2014-02-20 16:14:29 -05:00
Mike Bayer 5c88f38c72 fix typo rel_0_9_3 2014-02-19 23:09:07 -05:00
Mike Bayer 5634a3f104 0.8.5 released same day 2014-02-19 23:05:06 -05:00
Mike Bayer b2fd85b7d5 0.9.3 2014-02-19 23:01:40 -05:00
Mike Bayer a4f1d2ec6e skip this on oracle 2014-02-19 20:15:30 -05:00
Mike Bayer 57b214a0a4 - Added an additional message to psycopg2 disconnect detection,
"could not send data to server", which complements the existing
"could not receive data from server" and has been observed by users,
fixes #2936
2014-02-19 19:22:17 -05:00
Mike Bayer 69d1d08dc3 - re: #2967, also fixed a somewhat related issue where join rewriting would fail
on the columns clause of the SELECT statement if the targets were
aliased tables, as opposed to individual aliased columns.
2014-02-19 19:12:40 -05:00
Mike Bayer 25831872db - Fixed bug in SQLite "join rewriting" where usage of an exists() construct
would fail to be rewritten properly, such as when the exists is
mapped to a column_property in an intricate nested-join scenario. #2967
2014-02-19 19:04:04 -05:00
Mike Bayer a0fb9e74c6 - add a topological rule here to place PARTITIONS after PARTITION_BY,
for output consistency within the tests as well as in practice
2014-02-19 17:00:37 -05:00
Mike Bayer 8878e23079 restore the check ahead of the lock to avoid using it after initialization
is done
2014-02-19 16:11:19 -05:00
Mike Bayer 033463cd4b backport 2014-02-19 16:03:05 -05:00
Mike Bayer a552606091 - Added new MySQL-specific :class:.mysql.DATETIME which includes
fractional seconds support; also added fractional seconds support
to :class:`.mysql.TIMESTAMP`.  DBAPI support is limited, though
fractional seconds are known to be supported by MySQL Connector/Python.
Patch courtesy Geert JM Vanderkelen. #2941
2014-02-19 15:49:37 -05:00
Mike Bayer 0b4c0384f6 changelog for pullreq 12 2014-02-19 15:26:51 -05:00
Mike Bayer 7e66d7e392 Merge branch 'master' of https://bitbucket.org/50onred/sqlalchemy/overview into t 2014-02-19 15:24:36 -05:00
Mike Bayer 77ed036525 - Fixed bug where calling :meth:.Insert.values with an empty list
or tuple would raise an IndexError.   It now produces an empty
insert construct as would be the case with an empty dictionary.
2014-02-19 15:18:22 -05:00
Mike Bayer dd32540dab - Fixed a critical regression caused by 🎫2880 where the newly
concurrent ability to return connections from the pool means that the
"first_connect" event is now no longer synchronized either, thus leading
to dialect mis-configurations under even minimal concurrency situations.
2014-02-19 10:48:32 -05:00
Mike Bayer 185938e7b7 - update mysql connector python link, #2938 2014-02-18 20:49:33 -05:00
Mike Bayer ecdfc31774 - Support has been improved for Postgresql reflection behavior on very old
(pre 8.1) versions of Postgresql, and potentially other PG engines
such as Redshift (assuming Redshift reports the version as < 8.1).
The query for "indexes" as well as "primary keys" relies upon inspecting
a so-called "int2vector" datatype, which refuses to coerce to an array
prior to 8.1 causing failures regarding the "ANY()" operator used
in the query.  Extensive googling has located the very hacky, but
recommended-by-PG-core-developer query to use when PG version < 8.1
is in use, so index and primary key constraint reflection now work
on these versions.
2014-02-18 18:35:23 -05:00
Mike Bayer fdedb69d9c update docs re: cx_oracle unicode as of 0.9.2, no more outputtypehandlers 2014-02-18 16:58:14 -05:00
Mike Bayer b4d9795db1 - dont need this import and it's not in 2.6 anyway 2014-02-17 16:03:07 -05:00
Mike Bayer 88c23b8df2 ill never remember this URL so put it here
e Please enter the commit message for your changes. Lines starting
2014-02-17 14:54:38 -05:00
Mike Bayer 00c6ebb440 - rewrite SQLite reflection tests into one consistent fixture, which tests
both _resolve_type_affinity() directly as well as round trip tests fully.
2014-02-16 18:14:10 -05:00
Mike Bayer 5bc3b7fe6b - need qualifiers here... 2014-02-16 17:20:35 -05:00
Mike Bayer 5e100a70c5 - The SQLite dialect will now skip unsupported arguments when reflecting
types; such as if it encounters a string like ``INTEGER(5)``, the
:class:`.INTEGER` type will be instantiated without the "5" being included,
based on detecting a ``TypeError`` on the first attempt.
2014-02-16 17:20:18 -05:00
Mike Bayer 79f801eae8 - changelog + documentation for pullreq github:65 2014-02-16 17:10:05 -05:00
Mike Bayer 198a900bd1 Merge branch 'master' of https://github.com/eblume/sqlalchemy into t 2014-02-16 16:43:42 -05:00
Mike Bayer 937e81be16 - changelog for pullreq github:64 2014-02-16 16:41:36 -05:00
mike bayer d54ba44c2c Merge pull request #64 from LevonXXL/master
python_type for ARRAY (PGArray)
2014-02-16 16:40:04 -05:00
Mike Bayer 4588a0e603 - use column.info to detect those cols part of "versioning"
- pep8 cleanup
- fix tests for "changed" column
- document that "changed" is optional
- changelog
2014-02-16 16:38:09 -05:00
Mike Bayer 4dd7bf58c0 Merge branch 'patch-1' of https://github.com/jplaverdure/sqlalchemy into t 2014-02-16 16:23:54 -05:00
Mike Bayer a79efa2aa4 this isn't really the mainstream use case here; would need to talk
about non-equality operators in general.
2014-02-16 14:43:26 -05:00
Mike Bayer 1921e7a3cb - extensive cross-linking of relationship options with their documentation sections
- convert all paramter references in relationship documentation to :paramref:
2014-02-16 14:28:56 -05:00
Mike Bayer 945b87b2d8 remove redundant see also 2014-02-16 12:47:43 -05:00
Mike Bayer 9d5188b192 - add cross-linking for passive_deletes / passive_updates 2014-02-16 12:43:46 -05:00
Mike Bayer c3b1b55408 - add documentation regarding native hstore flag, psycopg2
hstore extension. #2959
2014-02-16 12:03:00 -05:00
Mike Bayer 70ed9c8b55 - expand docs on MySQL table arguments beyond just storage engines
- clarify section on "foreign key reflection" and group this in a
section that refers to foreign keys.
2014-02-15 20:51:38 -05:00
Mike Bayer 17ecf15a3b - cross link remote_side/self-referential
- trim off fn prefix on some relationship parameter names
2014-02-14 15:45:18 -05:00
Mike Bayer 28229a35e0 - Added server version detection to the newly added dialect startup
query for  "show standard_conforming_strings"; as this variable was
added as of PG 8.2, we skip the query for PG versions older than
that as well as for backends like Redshift. #2946
2014-02-14 14:39:41 -05:00
Mike Bayer 5330c02b72 this is for 0.9.3 also 2014-02-14 14:36:06 -05:00
Mike Bayer ffa6f45ec3 - Revised this very old issue where the Postgresql "get primary key"
reflection query were updated to take into account primary key constraints
that were renamed; the newer query fails on very old versions of
Postgresql such as version 7, so the old query is restored in those cases
when server_version_info < (8, 0) is detected. #2291
2014-02-14 14:32:00 -05:00
Marcus McCurdy c597843f13 Fixes MySQL dialect partitioning 2014-02-14 13:23:51 -05:00
Mike Bayer 3e7caad3cf - use an OrderedDict here so that tests are more deterministic 2014-02-14 13:17:58 -05:00
Mike Bayer 036cb93abf - Fixed bug where :meth:.in_() would go into an endless loop if
erroneously passed a column expression whose comparator included
the ``__getitem__()`` method, such as a column that uses the
:class:`.postgresql.ARRAY` type. [ticket:2957]
2014-02-13 15:19:12 -05:00
Mike Bayer 4a79bc578c - Fixed bug where :class:.AbstractConcreteBase would fail to be
fully usable within declarative relationship configuration, as its
string classname would not be available in the registry of classnames
at mapper configuration time.   The class now explicitly adds itself
to the class regsitry, and additionally both :class:`.AbstractConcreteBase`
as well as :class:`.ConcreteBase` set themselves up *before* mappers
are configured within the :func:`.configure_mappers` setup, using
the new :meth:`.MapperEvents.before_configured` event. [ticket:2950]

- Added new :meth:`.MapperEvents.before_configured` event which allows
an event at the start of :func:`.configure_mappers`, as well
as ``__declare_first__()`` hook within declarative to complement
``__declare_last__()``.

- modified how after_configured is invoked; we just make a dispatch()
not actually connected to any mapper.  this makes it easier
to also invoke before_configured correctly.

- improved the ComparableEntity fixture to handle collections that are sets.
2014-02-11 19:55:34 -05:00
Mike Bayer 0050a8d3db - changelog for [ticket:2934] 2014-02-11 18:00:10 -05:00
mike bayer c036cca67e Merge pull request #69 from sloat/pr2934
Fixes server version parsing in cymysql dialect
2014-02-11 17:57:40 -05:00
Matt (work) bd98bd5fff Parse server version info more robustly
Closes #2934
2014-02-11 17:26:03 -05:00
Mike Bayer bf934018a5 - for TextAsFrom, put the "inner" columns in the result map directly.
Have also considered linking column.label() to the "column" itself being
in the result map but this reveals some naming collision problems (that
also seem to be very poorly tested...).   This should be as far as
we want to go right now with [ticket:2932].
2014-02-10 19:17:00 -05:00
Mike Bayer 7d56f6c807 this example doesn't work, we don't really have a solution for this as far as automating this pattern 2014-02-10 17:43:37 -05:00
Mike Bayer 093ce65c5f - dont need these extra conditions from the previous test 2014-02-10 16:37:32 -05:00