]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/log
thirdparty/sqlalchemy/sqlalchemy.git
11 years agouse view_column requirement here
Mike Bayer [Fri, 28 Feb 2014 23:57:39 +0000 (18:57 -0500)] 
use view_column requirement here

11 years ago- dont create a self-ref FK if test suite marked as not supporting self ref
Mike Bayer [Fri, 28 Feb 2014 23:50:18 +0000 (18:50 -0500)] 
- dont create a self-ref FK if test suite marked as not supporting self ref
- break out reflection of views to support view column reflection separately
from view definition

11 years agofix typos
Mike Bayer [Fri, 28 Feb 2014 19:26:35 +0000 (14:26 -0500)] 
fix typos

11 years agoadd a migration for this one
Mike Bayer [Fri, 28 Feb 2014 19:23:44 +0000 (14:23 -0500)] 
add a migration for this one

11 years ago- Added a new option to :paramref:`.relationship.innerjoin` which is
Mike Bayer [Fri, 28 Feb 2014 19:15:13 +0000 (14:15 -0500)] 
- Added a new option to :paramref:`.relationship.innerjoin` which is
to specify the string ``"nested"``.  When set to ``"nested"`` as opposed
to ``True``, the "chaining" of joins will parenthesize the inner join on the
right side of an existing outer join, instead of chaining as a string
of outer joins.   This possibly should have been the default behavior
when 0.9 was released, as we introduced the feature of right-nested
joins in the ORM, however we are keeping it as a non-default for now
to avoid further surprises.
fixes #2976

11 years ago- Fixed bug in :func:`.tuple_` construct where the "type" of essentially
Mike Bayer [Fri, 28 Feb 2014 00:54:49 +0000 (19:54 -0500)] 
- Fixed bug in :func:`.tuple_` construct where the "type" of essentially
the first SQL expression would be applied as the "comparison type"
to a compared tuple value; this has the effect in some cases of an
inappropriate "type coersion" occurring, such as when a tuple that
has a mix of String and Binary values improperly coerces target
values to Binary even though that's not what they are on the left
side.  :func:`.tuple_` now expects heterogeneous types within its
list of values.
fixes #2977

11 years agorestore the contracts of update/extend to the degree that the same column identity
Mike Bayer [Thu, 27 Feb 2014 18:50:47 +0000 (13:50 -0500)] 
restore the contracts of update/extend to the degree that the same column identity
isn't appended to the list.  reflection makes use of this.

11 years ago- Fixed a regression in association proxy caused by :ticket:`2810` which
Mike Bayer [Thu, 27 Feb 2014 18:29:59 +0000 (13:29 -0500)] 
- Fixed a regression in association proxy caused by :ticket:`2810` which
caused a user-provided "getter" to no longer receive values of ``None``
when fetching scalar values from a target that is non-present.  The
check for None introduced by this change is now moved into the default
getter, so a user-provided getter will also again receive values of
None.
re: #2810

11 years ago- Removed stale names from ``sqlalchemy.orm.interfaces.__all__`` and
Mike Bayer [Thu, 27 Feb 2014 00:27:22 +0000 (19:27 -0500)] 
- Removed stale names from ``sqlalchemy.orm.interfaces.__all__`` and
refreshed with current names, so that an ``import *`` from this
module again works.
fixes #2975

11 years ago- Adjusted the logic which applies names to the .c collection when
Mike Bayer [Wed, 26 Feb 2014 20:45:52 +0000 (15:45 -0500)] 
- Adjusted the logic which applies names to the .c collection when
a no-name :class:`.BindParameter` is received, e.g. via :func:`.sql.literal`
or similar; the "key" of the bind param is used as the key within
.c. rather than the rendered name.  Since these binds have "anonymous"
names in any case, this allows individual bound parameters to
have their own name within a selectable if they are otherwise unlabeled.
fixes #2974

11 years ago- Some changes to how the :attr:`.FromClause.c` collection behaves
Mike Bayer [Wed, 26 Feb 2014 20:34:49 +0000 (15:34 -0500)] 
- Some changes to how the :attr:`.FromClause.c` collection behaves
when presented with duplicate columns.  The behavior of emitting a
warning and replacing the old column with the same name still
remains to some degree; the replacement in particular is to maintain
backwards compatibility.  However, the replaced column still remains
associated with the ``c`` collection now in a collection ``._all_columns``,
which is used by constructs such as aliases and unions, to deal with
the set of columns in ``c`` more towards what is actually in the
list of columns rather than the unique set of key names.  This helps
with situations where SELECT statements with same-named columns
are used in unions and such, so that the union can match the columns
up positionally and also there's some chance of :meth:`.FromClause.corresponding_column`
still being usable here (it can now return a column that is only
in selectable.c._all_columns and not otherwise named).
The new collection is underscored as we still need to decide where this
list might end up.   Theoretically it
would become the result of iter(selectable.c), however this would mean
that the length of the iteration would no longer match the length of
keys(), and that behavior needs to be checked out.
fixes #2974
- add a bunch more tests for ColumnCollection

11 years ago- Fixed issue in new :meth:`.TextClause.columns` method where the ordering
Mike Bayer [Wed, 26 Feb 2014 18:28:14 +0000 (13:28 -0500)] 
- Fixed issue in new :meth:`.TextClause.columns` method where the ordering
of columns given positionally would not be preserved.   This could
have potential impact in positional situations such as applying the
resulting :class:`.TextAsFrom` object to a union.

11 years ago- use MutableMapping to make this more succinct, complete
Mike Bayer [Wed, 26 Feb 2014 05:27:54 +0000 (00:27 -0500)] 
- use MutableMapping to make this more succinct, complete

11 years agodocs
Mike Bayer [Wed, 26 Feb 2014 01:10:52 +0000 (20:10 -0500)] 
docs

11 years ago- The new dialect-level keyword argument system for schema-level
Mike Bayer [Wed, 26 Feb 2014 00:52:17 +0000 (19:52 -0500)] 
- The new dialect-level keyword argument system for schema-level
constructs has been enhanced in order to assist with existing
schemes that rely upon addition of ad-hoc keyword arguments to
constructs.
- To suit the use case of allowing custom arguments at construction time,
the :meth:`.DialectKWArgs.argument_for` method now allows this registration.
fixes #2962

11 years ago- Fixed bug where events set to listen at the class
Mike Bayer [Tue, 25 Feb 2014 21:55:42 +0000 (16:55 -0500)] 
- Fixed bug where events set to listen at the class
level (e.g. on the :class:`.Mapper` or :class:`.ClassManager`
level, as opposed to on an individual mapped class, and also on
:class:`.Connection`) that also made use of internal argument conversion
(which is most within those categories) would fail to be removable.
fixes #2973

11 years ago- we're testing a query here with non-standard aliasing which fails on PG and MySQL.
Mike Bayer [Mon, 24 Feb 2014 17:59:32 +0000 (12:59 -0500)] 
- we're testing a query here with non-standard aliasing which fails on PG and MySQL.
Leave this test in place as its ultimately a SQLite use case, but only test on SQLite.
We perhaps should add another test case that works on all platforms.

11 years ago- Fixed regression from 0.8 where using an option like
Mike Bayer [Mon, 24 Feb 2014 17:52:12 +0000 (12:52 -0500)] 
- Fixed regression from 0.8 where using an option like
:func:`.orm.lazyload` with the "wildcard" expression, e.g. ``"*"``,
would raise an assertion error in the case where the query didn't
contain any actual entities.  This assertion is meant for other cases
and was catching this one inadvertently.

11 years ago- Fixed bug in the versioned_history example where column-level INSERT
Mike Bayer [Mon, 24 Feb 2014 17:34:54 +0000 (12:34 -0500)] 
- Fixed bug in the versioned_history example where column-level INSERT
defaults would prevent history values of NULL from being written.

11 years agomore detail, what actually loads, etc.
Mike Bayer [Mon, 24 Feb 2014 04:05:29 +0000 (23:05 -0500)] 
more detail, what actually loads, etc.

11 years ago-rewrite expire/refresh section
Mike Bayer [Sun, 23 Feb 2014 21:30:09 +0000 (16:30 -0500)] 
-rewrite expire/refresh section

11 years agono more wheels until they have a point
Mike Bayer [Sun, 23 Feb 2014 02:38:31 +0000 (21:38 -0500)] 
no more wheels until they have a point
fixes #2970

11 years ago- More fixes to SQLite "join rewriting"; the fix from :ticket:`2967`
Mike Bayer [Thu, 20 Feb 2014 21:14:29 +0000 (16:14 -0500)] 
- More fixes to SQLite "join rewriting"; the fix from :ticket:`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.

11 years agofix typo rel_0_9_3
Mike Bayer [Thu, 20 Feb 2014 04:09:07 +0000 (23:09 -0500)] 
fix typo

11 years ago0.8.5 released same day
Mike Bayer [Thu, 20 Feb 2014 04:05:06 +0000 (23:05 -0500)] 
0.8.5 released same day

11 years ago0.9.3
Mike Bayer [Thu, 20 Feb 2014 04:01:40 +0000 (23:01 -0500)] 
0.9.3

11 years agoskip this on oracle
Mike Bayer [Thu, 20 Feb 2014 01:15:30 +0000 (20:15 -0500)] 
skip this on oracle

11 years ago- Added an additional message to psycopg2 disconnect detection,
Mike Bayer [Thu, 20 Feb 2014 00:22:17 +0000 (19:22 -0500)] 
- 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

11 years ago- re: #2967, also fixed a somewhat related issue where join rewriting would fail
Mike Bayer [Thu, 20 Feb 2014 00:12:40 +0000 (19:12 -0500)] 
- 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.

11 years ago- Fixed bug in SQLite "join rewriting" where usage of an exists() construct
Mike Bayer [Thu, 20 Feb 2014 00:04:04 +0000 (19:04 -0500)] 
- 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

11 years ago- add a topological rule here to place PARTITIONS after PARTITION_BY,
Mike Bayer [Wed, 19 Feb 2014 22:00:37 +0000 (17:00 -0500)] 
- add a topological rule here to place PARTITIONS after PARTITION_BY,
for output consistency within the tests as well as in practice

11 years agorestore the check ahead of the lock to avoid using it after initialization
Mike Bayer [Wed, 19 Feb 2014 21:11:19 +0000 (16:11 -0500)] 
restore the check ahead of the lock to avoid using it after initialization
is done

11 years agobackport
Mike Bayer [Wed, 19 Feb 2014 21:03:05 +0000 (16:03 -0500)] 
backport

11 years ago- Added new MySQL-specific :class:`.mysql.DATETIME` which includes
Mike Bayer [Wed, 19 Feb 2014 20:49:37 +0000 (15:49 -0500)] 
- 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

11 years agochangelog for pullreq 12
Mike Bayer [Wed, 19 Feb 2014 20:26:51 +0000 (15:26 -0500)] 
changelog for pullreq 12

11 years agoMerge branch 'master' of https://bitbucket.org/50onred/sqlalchemy/overview into t
Mike Bayer [Wed, 19 Feb 2014 20:24:36 +0000 (15:24 -0500)] 
Merge branch 'master' of https://bitbucket.org/50onred/sqlalchemy/overview into t

11 years ago- Fixed bug where calling :meth:`.Insert.values` with an empty list
Mike Bayer [Wed, 19 Feb 2014 20:18:22 +0000 (15:18 -0500)] 
- 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.

11 years ago- Fixed a critical regression caused by :ticket:`2880` where the newly
Mike Bayer [Wed, 19 Feb 2014 15:48:32 +0000 (10:48 -0500)] 
- Fixed a critical regression caused by :ticket:`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.

11 years ago- update mysql connector python link, #2938
Mike Bayer [Wed, 19 Feb 2014 01:49:33 +0000 (20:49 -0500)] 
- update mysql connector python link, #2938

11 years ago- Support has been improved for Postgresql reflection behavior on very old
Mike Bayer [Tue, 18 Feb 2014 23:35:23 +0000 (18:35 -0500)] 
- 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.

11 years agoupdate docs re: cx_oracle unicode as of 0.9.2, no more outputtypehandlers
Mike Bayer [Tue, 18 Feb 2014 21:58:14 +0000 (16:58 -0500)] 
update docs re: cx_oracle unicode as of 0.9.2, no more outputtypehandlers

11 years ago- dont need this import and it's not in 2.6 anyway
Mike Bayer [Mon, 17 Feb 2014 21:03:07 +0000 (16:03 -0500)] 
- dont need this import and it's not in 2.6 anyway

11 years agoill never remember this URL so put it here
Mike Bayer [Mon, 17 Feb 2014 19:54:38 +0000 (14:54 -0500)] 
ill never remember this URL so put it here
e Please enter the commit message for your changes. Lines starting

11 years ago- rewrite SQLite reflection tests into one consistent fixture, which tests
Mike Bayer [Sun, 16 Feb 2014 23:14:10 +0000 (18:14 -0500)] 
- rewrite SQLite reflection tests into one consistent fixture, which tests
both _resolve_type_affinity() directly as well as round trip tests fully.

11 years ago- need qualifiers here...
Mike Bayer [Sun, 16 Feb 2014 22:20:35 +0000 (17:20 -0500)] 
- need qualifiers here...

11 years ago- The SQLite dialect will now skip unsupported arguments when reflecting
Mike Bayer [Sun, 16 Feb 2014 22:20:18 +0000 (17:20 -0500)] 
- 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.

11 years ago- changelog + documentation for pullreq github:65
Mike Bayer [Sun, 16 Feb 2014 22:10:05 +0000 (17:10 -0500)] 
- changelog + documentation for pullreq github:65

11 years agoMerge branch 'master' of https://github.com/eblume/sqlalchemy into t
Mike Bayer [Sun, 16 Feb 2014 21:43:42 +0000 (16:43 -0500)] 
Merge branch 'master' of https://github.com/eblume/sqlalchemy into t

11 years ago- changelog for pullreq github:64
Mike Bayer [Sun, 16 Feb 2014 21:41:36 +0000 (16:41 -0500)] 
- changelog for pullreq github:64

11 years agoMerge pull request #64 from LevonXXL/master
mike bayer [Sun, 16 Feb 2014 21:40:04 +0000 (16:40 -0500)] 
Merge pull request #64 from LevonXXL/master

python_type for ARRAY (PGArray)

11 years ago- use column.info to detect those cols part of "versioning"
Mike Bayer [Sun, 16 Feb 2014 21:38:09 +0000 (16:38 -0500)] 
- use column.info to detect those cols part of "versioning"
- pep8 cleanup
- fix tests for "changed" column
- document that "changed" is optional
- changelog

11 years agoMerge branch 'patch-1' of https://github.com/jplaverdure/sqlalchemy into t
Mike Bayer [Sun, 16 Feb 2014 21:23:54 +0000 (16:23 -0500)] 
Merge branch 'patch-1' of https://github.com/jplaverdure/sqlalchemy into t

11 years agothis isn't really the mainstream use case here; would need to talk
Mike Bayer [Sun, 16 Feb 2014 19:43:26 +0000 (14:43 -0500)] 
this isn't really the mainstream use case here; would need to talk
about non-equality operators in general.

11 years ago- extensive cross-linking of relationship options with their documentation sections
Mike Bayer [Sun, 16 Feb 2014 19:28:56 +0000 (14:28 -0500)] 
- extensive cross-linking of relationship options with their documentation sections
- convert all paramter references in relationship documentation to :paramref:

11 years agoremove redundant see also
Mike Bayer [Sun, 16 Feb 2014 17:47:43 +0000 (12:47 -0500)] 
remove redundant see also

11 years ago- add cross-linking for passive_deletes / passive_updates
Mike Bayer [Sun, 16 Feb 2014 17:43:46 +0000 (12:43 -0500)] 
- add cross-linking for passive_deletes / passive_updates

11 years ago- add documentation regarding native hstore flag, psycopg2
Mike Bayer [Sun, 16 Feb 2014 17:03:00 +0000 (12:03 -0500)] 
- add documentation regarding native hstore flag, psycopg2
hstore extension. #2959

11 years ago- expand docs on MySQL table arguments beyond just storage engines
Mike Bayer [Sun, 16 Feb 2014 01:51:38 +0000 (20:51 -0500)] 
- 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.

11 years ago- cross link remote_side/self-referential
Mike Bayer [Fri, 14 Feb 2014 20:45:18 +0000 (15:45 -0500)] 
- cross link remote_side/self-referential
- trim off fn prefix on some relationship parameter names

11 years ago- Added server version detection to the newly added dialect startup
Mike Bayer [Fri, 14 Feb 2014 19:39:41 +0000 (14:39 -0500)] 
- 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

11 years ago this is for 0.9.3 also
Mike Bayer [Fri, 14 Feb 2014 19:36:06 +0000 (14:36 -0500)] 
 this is for 0.9.3 also

11 years ago- Revised this very old issue where the Postgresql "get primary key"
Mike Bayer [Fri, 14 Feb 2014 19:32:00 +0000 (14:32 -0500)] 
- 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

11 years agoFixes MySQL dialect partitioning
Marcus McCurdy [Fri, 14 Feb 2014 18:23:51 +0000 (13:23 -0500)] 
Fixes MySQL dialect partitioning

11 years ago- use an OrderedDict here so that tests are more deterministic
Mike Bayer [Fri, 14 Feb 2014 18:17:58 +0000 (13:17 -0500)] 
- use an OrderedDict here so that tests are more deterministic

11 years ago- Fixed bug where :meth:`.in_()` would go into an endless loop if
Mike Bayer [Thu, 13 Feb 2014 20:19:12 +0000 (15:19 -0500)] 
- 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]

11 years ago- Fixed bug where :class:`.AbstractConcreteBase` would fail to be
Mike Bayer [Wed, 12 Feb 2014 00:55:34 +0000 (19:55 -0500)] 
- 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.

11 years ago- changelog for [ticket:2934]
Mike Bayer [Tue, 11 Feb 2014 23:00:10 +0000 (18:00 -0500)] 
- changelog for [ticket:2934]

11 years agoMerge pull request #69 from sloat/pr2934
mike bayer [Tue, 11 Feb 2014 22:57:40 +0000 (17:57 -0500)] 
Merge pull request #69 from sloat/pr2934

Fixes server version parsing in cymysql dialect

11 years agoParse server version info more robustly
Matt (work) [Tue, 11 Feb 2014 22:26:03 +0000 (17:26 -0500)] 
Parse server version info more robustly
Closes #2934

11 years ago- for TextAsFrom, put the "inner" columns in the result map directly.
Mike Bayer [Tue, 11 Feb 2014 00:17:00 +0000 (19:17 -0500)] 
- 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].

11 years agothis example doesn't work, we don't really have a solution for this as far as automat...
Mike Bayer [Mon, 10 Feb 2014 22:43:37 +0000 (17:43 -0500)] 
this example doesn't work, we don't really have a solution for this as far as automating this pattern

11 years ago- dont need these extra conditions from the previous test
Mike Bayer [Mon, 10 Feb 2014 21:37:32 +0000 (16:37 -0500)] 
- dont need these extra conditions from the previous test

11 years ago- Fixed bug where :meth:`.Query.get` would fail to consistently
Mike Bayer [Mon, 10 Feb 2014 21:33:48 +0000 (16:33 -0500)] 
- Fixed bug where :meth:`.Query.get` would fail to consistently
raise the :class:`.InvalidRequestError` that invokes when called
on a query with existing criterion, when the given identity is
already present in the identity map. [ticket:2951]

11 years ago- Fixed an 0.9 regression where ORM instance or mapper events applied
Mike Bayer [Sun, 9 Feb 2014 21:47:20 +0000 (16:47 -0500)] 
- Fixed an 0.9 regression where ORM instance or mapper events applied
to a base class such as a declarative base with the propagate=True
flag would fail to apply to existing mapped classes which also
used inheritance due to an assertion.  Addtionally, repaired an
attribute error which could occur during removal of such an event,
depending on how it was first assigned. [ticket:2949]

11 years ago- Fixed bug where the :class:`.AutomapBase` class of the
Mike Bayer [Sun, 9 Feb 2014 02:24:13 +0000 (21:24 -0500)] 
- Fixed bug where the :class:`.AutomapBase` class of the
new automap extension would fail if classes
were pre-arranged in single or potentially joined inheritance patterns.
The repaired joined inheritance issue could also potentially apply when
using :class:`.DeferredReflection` as well.

11 years ago- More issues with [ticket:2932] first resolved in 0.9.2 where
Mike Bayer [Thu, 6 Feb 2014 00:25:13 +0000 (19:25 -0500)] 
- More issues with [ticket:2932] first resolved in 0.9.2 where
using a column key of the form ``<tablename>_<columnname>``
matching that of an aliased column in the text would still not
match at the ORM level, which is ultimately due to a core
column-matching issue.  Additional rules have been added so that the
column ``_label`` is taken into account when working with a
:class:`.TextAsFrom` construct or with literal columns.
[ticket:2932]

11 years ago- Fixed regression in new "naming convention" feature where conventions
Mike Bayer [Wed, 5 Feb 2014 21:54:31 +0000 (16:54 -0500)] 
- Fixed regression in new "naming convention" feature where conventions
would fail if the referred table in a foreign key contained a schema
name.  Pull request courtesy Thomas Farvour. pullreq github:67

11 years agoAdd naming convention support when using schema in the metadata.
Tom Farvour [Wed, 5 Feb 2014 21:40:55 +0000 (15:40 -0600)] 
Add naming convention support when using schema in the metadata.

11 years ago- Fixed bug where so-called "literal render" of :func:`.bindparam`
Mike Bayer [Wed, 5 Feb 2014 17:03:46 +0000 (12:03 -0500)] 
- Fixed bug where so-called "literal render" of :func:`.bindparam`
constructs would fail if the bind were constructed with a callable,
rather than a direct value.  This prevented ORM expressions
from being rendered with the "literal_binds" compiler flag.

11 years agoSQLite dialect - support relection from affinity
Erich Blume [Tue, 4 Feb 2014 00:55:00 +0000 (16:55 -0800)] 
SQLite dialect - support relection from affinity

SQLite allows column types that aren't technically understood in sqlite
by using 'data affinity', which is an algorithm for converting column
types in to some sort of useful type that can be stored and retrieved
from the db. Unfortunatly, this breaks reflection since we (previously)
expected a sqlite db to reflect column types that we permit in the
`ischema_names` for that dialect.

This patch changes the logic for 'unknown' column types during
reflection to instead run through SQLite's data affinity algorithm, and
assigns appropriate types from that.

It also expands the matching for column type to include column types
with spaces (strongly discouraged but allowed by sqlite) and also
completely empty column types (in which case the NullType is assigned,
which sqlite will treat as a Blob - or rather, Blob is treated as
NullType). These changes mean that SQLite will never raise an error for
an unknown type during reflection - there will always be some 'useful'
type returned, which follows the spirit of SQLite (accomodation before
sanity!).

11 years ago- Improved the initialization logic of composite attributes such that
Mike Bayer [Tue, 4 Feb 2014 00:13:16 +0000 (19:13 -0500)] 
- Improved the initialization logic of composite attributes such that
calling ``MyClass.attribute`` will not require that the configure
mappers step has occurred, e.g. it will just work without throwing
any error. [ticket:2935]

11 years ago0.9.3
Mike Bayer [Mon, 3 Feb 2014 17:13:17 +0000 (12:13 -0500)] 
0.9.3

11 years ago- this seems to be the best string for pymysql
Mike Bayer [Mon, 3 Feb 2014 17:11:23 +0000 (12:11 -0500)] 
- this seems to be the best string for pymysql

11 years ago- Fixed bug which prevented MySQLdb-based dialects (e.g.
Mike Bayer [Mon, 3 Feb 2014 17:04:51 +0000 (12:04 -0500)] 
- Fixed bug which prevented MySQLdb-based dialects (e.g.
pymysql) from working in Py3K, where a check for "connection
charset" would fail due to Py3K's more strict value comparison
rules.  The call in question  wasn't taking the database
version into account in any case as the server version was
still None at that point, so the method overall has been
simplified to rely upon connection.character_set_name().
[ticket:2933]

11 years agopython_type for ARRAY (PGArray)
Terentev [Mon, 3 Feb 2014 12:25:18 +0000 (16:25 +0400)] 
python_type for ARRAY (PGArray)

11 years agotypo rel_0_9_2
Mike Bayer [Mon, 3 Feb 2014 00:28:41 +0000 (19:28 -0500)] 
typo

11 years ago0.9.2
Mike Bayer [Mon, 3 Feb 2014 00:19:24 +0000 (19:19 -0500)] 
0.9.2

11 years ago- Added a tweak to the "history_meta" example where the check for
Mike Bayer [Mon, 3 Feb 2014 00:05:36 +0000 (19:05 -0500)] 
- Added a tweak to the "history_meta" example where the check for
"history" on a relationship-bound attribute will now no longer emit
any SQL if the relationship is unloaded.

11 years ago- add a few missing methods to the cymysql dialect
Mike Bayer [Sun, 2 Feb 2014 23:16:17 +0000 (18:16 -0500)] 
- add a few missing methods to the cymysql dialect

11 years ago- lets intersphinx the new alembic article on constraint names
Mike Bayer [Sun, 2 Feb 2014 23:01:59 +0000 (18:01 -0500)] 
- lets intersphinx the new alembic article on constraint names

11 years ago- Added :paramref:`.MetaData.reflect.**dialect_kwargs`
Mike Bayer [Sun, 2 Feb 2014 21:33:54 +0000 (16:33 -0500)] 
- Added :paramref:`.MetaData.reflect.**dialect_kwargs`
to support dialect-level reflection options for all :class:`.Table`
objects reflected.

- Added a new dialect-level argument ``postgresql_ignore_search_path``;
this argument is accepted by both the :class:`.Table` constructor
as well as by the :meth:`.MetaData.reflect` method.  When in use
against Postgresql, a foreign-key referenced table which specifies
a remote schema name will retain that schema name even if the name
is present in the ``search_path``; the default behavior since 0.7.3
has been that schemas present in ``search_path`` would not be copied
to reflected :class:`.ForeignKey` objects.  The documentation has been
updated to describe in detail the behavior of the ``pg_get_constraintdef()``
function and how the ``postgresql_ignore_search_path`` feature essentially
determines if we will honor the schema qualification reported by
this function or not. [ticket:2922]

11 years ago- use from_statement() for the ORM column test
Mike Bayer [Sun, 2 Feb 2014 19:40:23 +0000 (14:40 -0500)] 
- use from_statement() for the ORM column test
- with select_from(), add external order by so that Oracle orders correctly

11 years ago- The behavior of :meth:`.Table.tometadata` has been adjusted such that
Mike Bayer [Sun, 2 Feb 2014 19:37:43 +0000 (14:37 -0500)] 
- The behavior of :meth:`.Table.tometadata` has been adjusted such that
the schema target of a :class:`.ForeignKey` will not be changed unless
that schema matches that of the parent table.  That is, if
a table "schema_a.user" has a foreign key to "schema_b.order.id",
the "schema_b" target will be maintained whether or not the
"schema" argument is passed to :meth:`.Table.tometadata`.  However
if a table "schema_a.user" refers to "schema_a.order.id", the presence
of "schema_a" will be updated on both the parent and referred tables.
This is a behavioral change hence isn't likely to be backported to
0.8; it is assumed that the previous behavior is pretty buggy
however and that it's unlikely anyone was relying upon it.

Additionally, a new parameter has been added
:paramref:`.Table.tometadata.referred_schema_fn`.  This refers to a
callable function which will be used to determine the new referred
schema for any :class:`.ForeignKeyConstraint` encountered in the
tometadata operation.  This callable can be used to revert to the
previous behavior or to customize how referred schemas are treated
on a per-constraint basis.  [ticket:2913]

- rework the tests in test.sql.test_metadata, all the "tometadata" tests
now under new class ToMetaDataTest

11 years ago- Fixed bug in new :class:`.TextAsFrom` construct where :class:`.Column`-
Mike Bayer [Sun, 2 Feb 2014 16:06:08 +0000 (11:06 -0500)] 
- Fixed bug in new :class:`.TextAsFrom` construct where :class:`.Column`-
oriented row lookups were not matching up to the ad-hoc :class:`.ColumnClause`
objects that :class:`.TextAsFrom` generates, thereby making it not
usable as a target in :meth:`.Query.from_statement`.  Also fixed
:meth:`.Query.from_statement` mechanics to not mistake a :class:`.TextAsFrom`
for a :class:`.Select` construct.  This bug is also an 0.9 regression
as the :meth:`.Text.columns` method is called to accommodate the
:paramref:`.text.typemap` argument. [ticket:2932]

11 years ago- Added a new feature which allows automated naming conventions to be
Mike Bayer [Sat, 1 Feb 2014 23:21:04 +0000 (18:21 -0500)] 
- Added a new feature which allows automated naming conventions to be
applied to :class:`.Constraint` and :class:`.Index` objects.  Based
on a recipe in the wiki, the new feature uses schema-events to set up
names as various schema objects are associated with each other.  The
events then expose a configuration system through a new argument
:paramref:`.MetaData.naming_convention`.  This system allows production
of both simple and custom naming schemes for constraints and indexes
on a per-:class:`.MetaData` basis.  [ticket:2923]

commit 7e65e52c086652de3dd3303c723f98f09af54db8
Author: Mike Bayer <mike_mp@zzzcomputing.com>
Date:   Sat Feb 1 15:09:04 2014 -0500

    - first pass at new naming approach

11 years agoadd a skip for oracle on this
Mike Bayer [Sat, 1 Feb 2014 18:22:43 +0000 (13:22 -0500)] 
add a skip for oracle on this

11 years ago- don't duplicate docs for Pool within QueuePool
Mike Bayer [Sat, 1 Feb 2014 04:13:13 +0000 (23:13 -0500)] 
- don't duplicate docs for Pool within QueuePool
- add huge warning regarding how use_threadlocal probably not what you want

11 years ago- Added a new directive used within the scope of an attribute "set" operation
Mike Bayer [Sat, 1 Feb 2014 00:57:38 +0000 (19:57 -0500)] 
- Added a new directive used within the scope of an attribute "set" operation
to disable autoflush, in the case that the attribute needs to lazy-load
the "old" value, as in when replacing one-to-one values or some
kinds of many-to-one.  A flush at this point otherwise occurs
at the point that the attribute is None and can cause NULL violations.
[ticket:2921]

11 years ago- Added a new parameter :paramref:`.Operators.op.is_comparison`. This
Mike Bayer [Sat, 1 Feb 2014 00:14:08 +0000 (19:14 -0500)] 
- Added a new parameter :paramref:`.Operators.op.is_comparison`.  This
flag allows a custom op from :meth:`.Operators.op` to be considered
as a "comparison" operator, thus usable for custom
:paramref:`.relationship.primaryjoin` conditions.

11 years ago- Fixed bug whereby SQLite compiler failed to propagate compiler arguments
Mike Bayer [Fri, 31 Jan 2014 22:57:17 +0000 (17:57 -0500)] 
- Fixed bug whereby SQLite compiler failed to propagate compiler arguments
such as "literal binds" into a CAST expression.
- Fixed bug whereby binary type would fail in some cases
if used with a "test" dialect, such as a DefaultDialect or other
dialect with no DBAPI.
- Fixed bug where "literal binds" wouldn't work with a bound parameter
that's a binary type.  A similar, but different, issue is fixed
in 0.8.