Commit Graph

10240 Commits

Author SHA1 Message Date
Mike Bayer be5caf1ad7 Merge branch 'master' into rel_0_9 2013-12-20 19:12:54 -05:00
Mike Bayer 730b232393 - improve documentation for return_defaults() and returned_defaults. [ticket:2852] 2013-12-20 19:12:31 -05:00
Mike Bayer acb8a2216c Merge branch 'master' into rel_0_9 2013-12-20 10:26:26 -05:00
Mike Bayer 65bd6ec966 - Fixed issue where a primary key column that has a Sequence on it,
yet the column is not the "auto increment" column, either because
it has a foreign key constraint or ``autoincrement=False`` set,
would attempt to fire the Sequence on INSERT for backends that don't
support sequences, when presented with an INSERT missing the primary
key value.  This would take place on non-sequence backends like
SQLite, MySQL. [ticket:2896]
2013-12-20 10:26:09 -05:00
Mike Bayer affb88167a Merge branch 'master' into rel_0_9 2013-12-19 16:07:43 -05:00
Mike Bayer 5402e2f5dd remove print 2013-12-19 16:07:35 -05:00
Mike Bayer ceb12eae90 Merge branch 'master' into rel_0_9 2013-12-19 16:02:40 -05:00
Mike Bayer 5f76f29c15 - Fixed bug with :meth:.Insert.from_select method where the order
of the given names would not be taken into account when generating
the INSERT statement, thus producing a mismatch versus the column
names in the given SELECT statement.  Also noted that
:meth:`.Insert.from_select` implies that Python-side insert defaults
cannot be used, since the statement has no VALUES clause. [ticket:2895]
2013-12-19 16:02:14 -05:00
Mike Bayer f5528e28f7 Merge branch 'master' into rel_0_9 2013-12-19 13:14:57 -05:00
Mike Bayer 47eb5682d1 fix doc target 2013-12-19 13:14:51 -05:00
Mike Bayer bc8805506e Merge branch 'master' into rel_0_9 2013-12-18 18:26:41 -05:00
Mike Bayer 2692238f45 - Improvements to the system by which SQL types generate within
``__repr__()``, particularly with regards to the MySQL integer/numeric/
character types which feature a wide variety of keyword arguments.
The ``__repr__()`` is important for use with Alembic autogenerate
for when Python code is rendered in a migration script.
[ticket:2893]
2013-12-18 18:26:15 -05:00
Mike Bayer c39746247a Merge branch 'master' into rel_0_9 2013-12-18 14:02:52 -05:00
Mike Bayer f701f87c13 - skip this test for oracle 2013-12-18 14:02:40 -05:00
Mike Bayer 93267146f1 Merge branch 'master' into rel_0_9 2013-12-17 17:56:20 -05:00
Mike Bayer be06bcf3b9 - remove very ancient TypeEngine constructor, not used by anything 2013-12-17 17:56:03 -05:00
Mike Bayer ca1159d084 Merge branch 'master' into rel_0_9 2013-12-17 17:46:56 -05:00
Mike Bayer fec03c88d6 - make the json serializer and deserializer per-dialect, so that we are
compatible with psycopg2's per-connection/cursor approach.  add round trip tests for
both native and non-native.
2013-12-17 17:46:09 -05:00
Mike Bayer d4ee945fe7 Merge branch 'master' into rel_0_9 2013-12-17 17:16:49 -05:00
Mike Bayer 653fcb892b this is a github PR 2013-12-17 17:16:43 -05:00
Mike Bayer 94e39cea57 Merge branch 'master' into rel_0_9 2013-12-17 16:30:29 -05:00
Mike Bayer c95e3c6512 add JSON 2013-12-17 16:30:22 -05:00
Mike Bayer 1ee5c07d1d Merge branch 'master' into rel_0_9 2013-12-17 16:28:55 -05:00
Mike Bayer de2cfa2d1e autoincrement here 2013-12-17 16:28:43 -05:00
Mike Bayer a51cdab062 Merge branch 'master' into rel_0_9 2013-12-17 15:40:37 -05:00
Mike Bayer ed174b71bf - changelog 2013-12-17 15:40:19 -05:00
Mike Bayer 80b6591dbe - The :func:.cast function, when given a plain literal value,
will now apply the given type to the given literal value on the
bind parameter side according
to the type given to the cast.   This essentially replaces what would
normally be the detected type of the literal value.   This only
takes effect if the auto-detected type of the literal value is either
"nulltype" (e.g. couldn't detect)
or a type that is of the same "affinity" as the cast type.
The net change here is that the :func:`.cast` function includes more
of the functionality already present in the :func:`.type_coerce` function.
2013-12-17 15:38:35 -05:00
Mike Bayer d98fcca0b3 this test appears to be failing with pg 9.3, not sure how to restore it 2013-12-17 15:37:50 -05:00
Mike Bayer e1802ff542 - using AssertsCompiledSQL so need __dialect__ 2013-12-17 15:33:27 -05:00
Mike Bayer 73013914e7 - rework JSON expressions to be based off __getitem__ exclusively
- add support for "standalone" JSON objects; this involves getting CAST
to upgrade the given type of a bound parameter.  should add a core-only test
for this.
- add tests for "standalone" json round trips both with and without unicode
- add mechanism by which we remove psycopg2's "json" handler in order to get
the effect of using our non-native result handlers
2013-12-17 15:13:39 -05:00
Mike Bayer 10ac89cef3 - enhance the exclusions system to support database versions within the __only_on__ attribute 2013-12-17 14:24:48 -05:00
Mike Bayer 2c3afb4dcb Merge branch 'issue_2581' of github.com:nathan-rice/sqlalchemy into pg_json 2013-12-17 14:03:20 -05:00
Mike Bayer 1e6ae7047b Merge branch 'master' into rel_0_9 2013-12-16 19:33:40 -05:00
Mike Bayer 207aaf2f41 - for [ticket:2651], leaving CheckConstraint alone, preferring to keep
backwards compatibility.  A note about backslashing escapes is added.
Because the Text() construct now supports bind params better, the example
given in the code raises an exception now, so that should cover us.
The exception itself has been enhanced to include the key name of the
bound param.  We're backporting this to 0.8 but 0.8 doesn't have the
text->bind behavior that raises.
2013-12-16 19:32:10 -05:00
Mike Bayer fc0f7e3a5c Merge branch 'master' into rel_0_9 2013-12-16 19:18:00 -05:00
Mike Bayer 84f1d34179 - An adjustment to the :func:.subqueryload strategy which ensures that
the query runs after the loading process has begun; this is so that
the subqueryload takes precedence over other loaders that may be
hitting the same attribute due to other eager/noload situations
at the wrong time. [ticket:2887]
2013-12-16 19:17:41 -05:00
Mike Bayer 6f7ce05776 Merge branch 'master' into rel_0_9 2013-12-16 18:53:14 -05:00
Mike Bayer 98c23acee6 - fix up the FAQ regarding the "foo_id" issue
- add session object states to the glossary
2013-12-16 18:52:52 -05:00
John Anderson 3147ca3040 Remove terminated connections from the pool.
In pymssql, if you terminate a long running query manually
it will give you a connection reset by peer message, but this
connection remains in the pool and will be re-used.
2013-12-16 12:50:10 -08:00
Mike Bayer 99f1dc7da6 Merge branch 'master' into rel_0_9 2013-12-16 15:26:11 -05:00
Mike Bayer 1d9eb41013 - Fixed bug when using joined table inheritance from a table to a
select/alias on the base, where the PK columns were also not same
named; the persistence system would fail to copy primary key values
from the base table to the inherited table upon INSERT.
[ticket:2885]
2013-12-16 15:25:48 -05:00
Mike Bayer e5fa101492 Merge branch 'master' into rel_0_9 2013-12-16 14:35:59 -05:00
Mike Bayer 015e804c48 wrong method name 2013-12-16 14:35:51 -05:00
Mike Bayer 1a05d769dc Merge branch 'master' into rel_0_9 2013-12-15 21:27:09 -05:00
Mike Bayer b2223ab149 - add "force_nocheck" as a way to turn on unicode=force without even
doing the isinstance() check - currently used only by psycopg2 + native enum + py2k.
- didn't realize psycopg2 had UNICODEARRAY extension all this time; replace _PGArray
with just using UNICODEARRAY instead.
- replace unnecessary/inconsistent __import__ in _isolation_lookup.
2013-12-15 21:23:01 -05:00
Mike Bayer f49051838f Merge branch 'master' into rel_0_9 2013-12-15 20:06:49 -05:00
Mike Bayer 638c1c46b2 load_on_pending is different from enable_relationship_loading and should
not be superseded.  both have a potential use.
2013-12-15 20:06:27 -05:00
Mike Bayer 8a70b456ec Merge branch 'master' into rel_0_9 2013-12-12 13:37:02 -05:00
Mike Bayer 7523599366 make the error message for [ticket:2889] more accurate, as we support
composites to many-to-ones now also
2013-12-12 13:36:58 -05:00
Mike Bayer 9df84c6269 Merge branch 'master' into rel_0_9 2013-12-12 13:31:10 -05:00