summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* YEAR(2) emits a warning and oursql / mysqlconnector throw an exceptionMike Bayer2013-06-231-4/+2
| | | | on the warning so just dump it
* - add a test for pullreq 8Mike Bayer2013-06-231-0/+26
| | | | - simplify
* tweak this for now, would need a testMike Bayer2013-06-231-11/+0
|
* The resolution of :class:`.ForeignKey` objects to theirMike Bayer2013-06-233-36/+323
| | | | | | | | | | | | | | | | | | target :class:`.Column` has been reworked to be as immediate as possible, based on the moment that the target :class:`.Column` is associated with the same :class:`.MetaData` as this :class:`.ForeignKey`, rather than waiting for the first time a join is constructed, or similar. This along with other improvements allows earlier detection of some foreign key configuration issues. Also included here is a rework of the type-propagation system, so that it should be reliable now to set the type as ``None`` on any :class:`.Column` that refers to another via :class:`.ForeignKey` - the type will be copied from the target column as soon as that other column is associated, and now works for composite foreign keys as well. [ticket:1765]
* Fix unicode literals on Python 3.1 and 3.2pr/10Roman Podolyaka2013-06-231-8/+8
| | | | | A few tests use u'' unicode literals which are not supported in Python versions 3.1 and 3.2.
* Provided a new attribute for :class:`.TypeDecorator`Mike Bayer2013-06-221-1/+33
| | | | | | | | | 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]
* this locale is not needed. maybe it is somewhere but the locale I have ↵Mike Bayer2013-06-222-18/+9
| | | | | | ("C", whatever that means, cannot find meaning of this anywhere in Postgresql documentation) seems to work
* Merge pull request #5 from cjw296/pg-rangesmike bayer2013-06-222-1/+344
|\ | | | | Support for Postgres range types.
| * Implement EXCLUDE constraints for postgres.Chris Withers2013-06-101-1/+49
| |
| * add support for range operators listed in ↵Chris Withers2013-06-101-1/+159
| | | | | | | | http://www.postgresql.org/docs/9.2/interactive/functions-range.html
| * Basic type support for the new range types in postgres 9.2Chris Withers2013-06-102-1/+138
| |
* | turn this requirement back down as the simpler serialize works better nowMike Bayer2013-06-172-8/+1
| |
* | - rework PropComparator.adapted() to be PropComparator.adapt_to_entity(),Mike Bayer2013-06-171-1/+1
| | | | | | | | | | | | | | 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]
* | can remove this, issue is fixedMike Bayer2013-06-171-10/+1
| |
* | - clean up this test (really we don't even need this, it's not testing much)Mike Bayer2013-06-161-13/+20
| | | | | | | | | | - for the moment, put a catch in it to see if we can trap that issue on jenkins
* | Merge pull request #7 from malor/psycopg2_execution_optionsmike bayer2013-06-151-0/+10
|\ \ | | | | | | Add AUTOCOMMIT isolation level support for psycopg2
| * | Add AUTOCOMMIT isolation level support for psycopg2pr/7Roman Podolyaka2013-06-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Fixed bug in polymorphic SQL generation where multiple joined-inheritanceMike Bayer2013-06-151-1/+91
|/ / | | | | | | | | | | | | 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]
* | - skip this test for py3k. serializer kind of a bustMike Bayer2013-06-142-1/+9
| |
* | Preserve reset_on_return when recreating a Pool.pr/6Eevee2013-06-101-1/+2
| |
* | Fixed bug where sending a composite attribute into :meth:`.Query.order_by`Mike Bayer2013-06-101-1/+27
| | | | | | | | | | would produce a parenthesized expression not accepted by some databases. [ticket:2754]
* | Fixed the interaction between composite attributes andMike Bayer2013-06-101-4/+35
|/ | | | | | 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]
* - get_unique_constraints() pull requestMike Bayer2013-06-092-34/+8
| | | | | | - version (0.9 for now) - changelog - move the test into the test suite so that all dialects can take advantage of it
* Add basic support of unique constraints reflectionpr/4Roman Podolyaka2013-06-091-0/+37
| | | | | | | | | | | | 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.
* get nested joins to render on oracle 8Mike Bayer2013-06-081-0/+33
|
* - tests for the alias() APIMike Bayer2013-06-081-1/+74
| | | | - docs docs docs
* most of these dialect=mysql.dialect() calls are redundantMike Bayer2013-06-081-23/+13
|
* Fix using of 'mysql_length' for composite indexesRoman Podolyaka2013-06-081-0/+29
| | | | | | | | | | | | | | | | | Currently, one can specify the prefix length for an index column using 'mysql_length' keyword argument when creating an Index instance. But in case of composite indexes the prefix length value is applied only to the last column. Extend the existing API in way so that 'mysql_length' argument value can be either: - an integer specifying the same prefix length value for each column of an index - a (column_name --> integer value) mapping specifying the prefix length value for each column of an index separately Fixes issue #2704.
* also clarified the changelog regarding Cls.scalar != 'value'Mike Bayer2013-06-081-11/+11
|
* Added additional criterion to the ==, != comparators, used withMike Bayer2013-06-081-20/+148
| | | | | | | | | | | | | | | | | | | 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]
* - Fixed an obscure bug where the wrong results would beMike Bayer2013-06-074-95/+353
| | | | | | | | | | | 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]
* remove all remaining start/end py2k/py3k blocksMike Bayer2013-06-075-127/+96
|
* fix testMike Bayer2013-06-061-0/+1
|
* Merge branch 'ticket_2587'Mike Bayer2013-06-063-19/+191
|\
| * dial back the default "flatness" a bit, it will be there for joinedload and ↵Mike Bayer2013-06-063-28/+154
| | | | | | | | | | | | | | query.join(), but if you're dealing with aliased() or with_polymorphic() you need to say "flat=True". Just the one flag though, "flat" implies "aliased".
| * a test for what's breaking, plus a non-working fix for it...Mike Bayer2013-06-051-1/+47
| |
* | When querying the information schema on SQL Server 2000, removedMike Bayer2013-06-061-2/+24
|/ | | | | | | 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]
* genericize tests hereMike Bayer2013-06-041-5/+10
|
* Merge branch 'ticket_2587'Mike Bayer2013-06-0410-242/+501
|\ | | | | | | | | | | Conflicts: test/profiles.txt test/sql/test_selectable.py
| * - add coverage for result map rewritingMike Bayer2013-06-041-0/+6
| | | | | | | | | | - fix the result map rewriter for col mismatches, since the rewritten select at the moment typically has more columns than the original
| * callcountsMike Bayer2013-06-041-14/+9
| |
| * - if the select() does not have use_labels on, then we just renderMike Bayer2013-06-041-0/+51
| | | | | | | | | | | | the joins as is, regardless of the dialect not supporting it. use_labels=True indicates a higher level of automation and also can maintain the labels between rewritten and not. use_labels=False indicates a manual use case.
| * - support for a__b_dc, i.e. two levels of nestingMike Bayer2013-06-041-35/+131
| |
| * repair these tests now that we allow join from selectable to fromgroupingMike Bayer2013-06-041-21/+26
| |
| * - add a flag to DefaultDialect for this so that people will have someMike Bayer2013-06-041-1/+28
| | | | | | | | workaround
| * - improve overlapping selectables, apply to both query and relationshipMike Bayer2013-06-044-111/+81
| | | | | | | | | | | | - clean up inspect() calls within query._join() - make sure join.alias(flat) propagates - fix almost all assertion tests
| * - eager loadsMike Bayer2013-06-042-78/+52
| | | | | | | | - two suite of SQL assertions converted
| * rewriting scheme now works.Mike Bayer2013-06-041-28/+21
| |
| * capture the really hard one in a test (hooray)Mike Bayer2013-06-041-0/+119
| |
| * working through tests....Mike Bayer2013-06-021-12/+11
| |