Commit Graph

10240 Commits

Author SHA1 Message Date
Roman Podolyaka 9029622920 Improve _test_get_unique_constraints()
Call eq_() in a loop instead of comparing two lists
directly. This makes it much easier to find out which
element is not equal to the reference value.
2013-06-23 10:35:46 +03:00
Mike Bayer eba9d1b58f Provided a new attribute for :class:.TypeDecorator
called :attr:`.TypeDecorator.coerce_to_is_types`,
to make it easier to control how comparisons using
``==`` or ``!=`` to ``None`` and boolean types goes
about producing an ``IS`` expression, or a plain
equality expression with a bound parameter.
[ticket:2744]
2013-06-22 12:19:41 -04:00
Mike Bayer 38b5495511 versionadds 2013-06-22 11:48:33 -04:00
Mike Bayer 2f2115cf0c 0.9 changelog 2013-06-22 11:40:49 -04:00
Mike Bayer 62dc627219 - 0.8 changelog
- some whitespace
2013-06-22 11:40:32 -04:00
Mike Bayer db24d2e813 this locale is not needed. maybe it is somewhere but the locale I have ("C", whatever that means,
cannot find meaning of this anywhere in Postgresql documentation) seems to work
2013-06-22 11:25:41 -04:00
mike bayer 29fa6913be Merge pull request #5 from cjw296/pg-ranges
Support for Postgres range types.
2013-06-22 07:47:02 -07:00
Devi a2a570e9f4 make tests pass 2013-06-20 16:42:19 +05:30
Devi 27d9972829 check if compostite_class is of class type
before checking if it is a subclass of `MutableComposite`
2013-06-19 16:03:23 +05:30
Mike Bayer 8c555f24b1 Merged in goodscloud/sqlalchemy (pull request #3)
Forgot final check that a delete in a backref also doesn't create a new version
2013-06-18 14:03:09 -04:00
Mike Bayer 4517a854bc fix up the isolation level docs which were a mess 2013-06-17 23:12:04 -04:00
Mike Bayer dde15ec545 remove double methods 2013-06-17 19:48:49 -04:00
Mike Bayer 247c0471c7 turn this requirement back down as the simpler serialize works better now 2013-06-17 19:46:07 -04:00
Mike Bayer 7f82168cb6 - rework PropComparator.adapted() to be PropComparator.adapt_to_entity(),
passes in AliasedInsp and allows more flexibility.
- rework the AliasedClass/AliasedInsp relationship so that AliasedInsp has
all state and functionality.  AliasedClass is just a facade.
[ticket:2756]
2013-06-17 19:42:43 -04:00
Mike Bayer 42d58f8b6e migration for [ticket:2751] 2013-06-17 17:48:10 -04:00
Matt Chisholm f499b7b883 Forgot final check that a delete in a backref also doesn't create a new version
follow up to https://bitbucket.org/zzzeek/sqlalchemy/pull-request/2
2013-06-17 23:30:07 +02:00
Mike Bayer 7ff503855f changelog for 0.8 2013-06-17 16:50:26 -04:00
Mike Bayer dec742c8c1 changelog 2013-06-17 16:47:16 -04:00
Mike Bayer 83090f35d7 Merge branch 'master' of bitbucket.org:zzzeek/sqlalchemy 2013-06-17 16:06:50 -04:00
Mike Bayer 6b5192395a Merged in goodscloud/sqlalchemy (pull request #2)
don't create a history entry when an object in a backref has changed
2013-06-17 16:06:29 -04:00
Mike Bayer 0e83f757a8 can remove this, issue is fixed 2013-06-17 16:05:11 -04:00
Mike Bayer 07e6161c6b - clean up this test (really we don't even need this, it's not testing much)
- for the moment, put a catch in it to see if we can trap that issue
on jenkins
2013-06-16 23:09:31 -04:00
Mike Bayer d826d99544 - changelog
- docs
2013-06-15 22:58:04 -04:00
mike bayer 9612e2fbb5 Merge pull request #7 from malor/psycopg2_execution_options
Add AUTOCOMMIT isolation level support for psycopg2
2013-06-15 19:52:00 -07:00
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
Matt Chisholm d6c60cb2f3 don't create a history entry when an object in a backref has changed
The code that determines whether an object in a relation has been added/removed does not take into account that that relation may be a backref. If the relation is a backref, then nothing on the current table is changing, and therefore no history entry should be created.
2013-06-15 18:15:29 +02:00
Roman Podolyaka a1ceae2ed3 Add AUTOCOMMIT isolation level support for psycopg2
One can use this to emit statements, which can not be
executed within a transaction (e. g. CREATE DATABASE):

    from sqlalchemy import create_engine

    eng = create_engine('postgresql://test:test@localhost/test')

    conn = eng.connect().execution_options(isolation_level='AUTOCOMMIT')
    conn.execute('CREATE DATABASE test2;')

Fixes issue #2072.
2013-06-15 16:54:50 +03:00
Mike Bayer 9d3e220636 - skip this test for py3k. serializer kind of a bust 2013-06-14 18:34:01 -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 bd1f232063 Merge pull request #6 from eevee/propagate-reset-on-return
Preserve reset_on_return when recreating a Pool.
2013-06-10 16:38:48 -07:00
Eevee 23ce1d8b12 Preserve reset_on_return when recreating a Pool. 2013-06-10 15:04:39 -07: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
Chris Withers b2ea2eef5d Implement EXCLUDE constraints for postgres. 2013-06-10 12:09:56 +01:00
Chris Withers f4020282b7 add support for range operators listed in http://www.postgresql.org/docs/9.2/interactive/functions-range.html 2013-06-10 12:09:55 +01:00
Chris Withers 70edfa229c Basic type support for the new range types in postgres 9.2 2013-06-10 12:09:55 +01:00
Mike Bayer 1652491cc6 this comment is ancient 2013-06-09 20:36:37 -04:00
Mike Bayer c0ff3eb9d7 these notes about **kw are incorrect, we are talking about the return value here 2013-06-09 17:56:31 -04: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 decf47a770 Merge pull request #4 from malor/reflect_constraints
Add basic support of unique constraints reflection
2013-06-09 14:39:30 -07:00
Roman Podolyaka c69fe4acf8 Add basic support of unique constraints reflection
Inspection API already supports reflection of table
indexes information and those also include unique
constraints (at least for PostgreSQL and MySQL).
But it could be actually useful to distinguish between
indexes and plain unique constraints (though both are
implemented in the same way internally in RDBMS).

This change adds a new method to Inspection API - get_unique_constraints()
and implements it for SQLite, PostgreSQL and MySQL dialects.
2013-06-09 23:49:55 +03: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 a144f55e65 cleanup 2013-06-08 19:07:52 -04:00
Mike Bayer 85368d25ed get nested joins to render on oracle 8 2013-06-08 18:54:14 -04:00