summaryrefslogtreecommitdiff
path: root/test/sql
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed bug where :func:`.type_coerce` would not interpret ORMMike Bayer2013-10-211-0/+11
| | | | | | | | elements with a ``__clause_element__()`` method properly. [ticket:2849] Conflicts: lib/sqlalchemy/sql/elements.py
* fix python 2.5 ismMike Bayer2013-10-201-2/+2
|
* - add a type_coerce() step within Enum, Boolean to the CHECK constraint,Mike Bayer2013-10-201-2/+68
| | | | | | | | | | | | so that the custom type isn't exposed to an operation that is against the "impl" type's constraint, [ticket:2842] - this change showed up as some recursion overflow in pickling with labels, add a __reduce__() there....pickling of expressions is less and less something that's very viable... Conflicts: lib/sqlalchemy/sql/elements.py lib/sqlalchemy/sql/sqltypes.py
* The ``.unique`` flag on :class:`.Index` could be produced as ``None``Mike Bayer2013-10-141-0/+22
| | | | | | | | | if it was generated from a :class:`.Column` that didn't specify ``unique`` (where it defaults to ``None``). The flag will now always be ``True`` or ``False``. [ticket:2825] Conflicts: lib/sqlalchemy/sql/schema.py
* - Fixed bug in default compiler plus those of postgresql, mysql, andMike Bayer2013-10-121-0/+21
| | | | | | | | | | | mssql to ensure that any literal SQL expression values are rendered directly as literals, instead of as bound parameters, within a CREATE INDEX statement. [ticket:2742] - don't need expression_as_ddl(); literal_binds and include_table take care of this functionality. Conflicts: lib/sqlalchemy/sql/util.py
* A :func:`.select` that is made to refer to itself in its FROM clause,Mike Bayer2013-10-081-0/+12
| | | | | | | | | typically via in-place mutation, will raise an informative error message rather than causing a recursion overflow. [ticket:2815] Conflicts: lib/sqlalchemy/sql/selectable.py
* Fixed bug where using an annotation such as :func:`.remote` orMike Bayer2013-10-081-0/+7
| | | | | | | | | | :func:`.foreign` on a :class:`.Column` before association with a parent :class:`.Table` could produce issues related to the parent table not rendering within joins, due to the inherent copy operation performed by an annotation. [ticket:2813] Conflicts: lib/sqlalchemy/sql/elements.py
* Non-working "schema" argument on :class:`.ForeignKey` is deprecated;Mike Bayer2013-10-081-0/+7
| | | | raises a warning. Removed in 0.9. [ticket:2831]
* forgot to add system to the copy() methodMike Bayer2013-08-251-0/+7
|
* added "system=True" to Column, so that we generally don't have to botherMike Bayer2013-08-251-0/+9
| | | | with CreateColumn rules
* apply test skips for pypy issue #1573 in 0.8 [ticket:2805]Mike Bayer2013-08-201-1/+7
|
* Fixed regression dating back to 0.7.9 whereby the name of a CTE mightMike Bayer2013-08-181-0/+16
| | | | | | | | not be properly quoted if it was referred to in multiple FROM clauses. Also in 0.8.3, 0.7.11. [ticket:2801] Conflicts: doc/build/changelog/changelog_09.rst
* - The :meth:`.Operators.notin_` operator added in 0.8 now properlyMike Bayer2013-08-071-0/+11
| | | | | produces the negation of the expression "IN" returns when used against an empty collection. Also in 0.8.3.
* - Fixed bug in common table expression system where if the CTE wereMike Bayer2013-07-311-0/+29
| | | | | | used only as an ``alias()`` construct, it would not render using the WITH keyword. Also in 0.7.11. [ticket:2783]
* Fixed bug in :class:`.CheckConstraint` DDL where the "quote" flag from aMike Bayer2013-07-171-0/+23
| | | | | :class:`.Column` object would not be propagated. Also in 0.8.3, 0.7.11. [ticket:2784]
* Fixed bug where the expression system relied upon the ``str()``Mike Bayer2013-07-122-0/+53
| | | | | | | | | | | | form of a some expressions when referring to the ``.c`` collection on a ``select()`` construct, but the ``str()`` form isn't available since the element relies on dialect-specific compilation constructs, notably the ``__getitem__()`` operator as used with a Postgresql ``ARRAY`` element. The fix also adds a new exception class :class:`.UnsupportedCompilationError` which is raised in those cases where a compiler is asked to compile something it doesn't know how to. [ticket:2780]
* - Added new method to the :func:`.insert` constructMike Bayer2013-07-051-1/+64
| | | | | | | | | | :meth:`.Insert.from_select`. Given a list of columns and a selectable, renders ``INSERT INTO (table) (columns) SELECT ..``. While this feature is highlighted as part of 0.9 it is also backported to 0.8.3. [ticket:722] - The :func:`.update`, :func:`.insert`, and :func:`.delete` constructs will now interpret ORM entities as FROM clauses to be operated upon, in the same way that select() already does.
* genericize tests hereMike Bayer2013-07-021-5/+10
|
* Fixed bug when using multi-table UPDATE where a supplementalMike Bayer2013-07-021-0/+39
| | | | | | | table is a SELECT with its own bound parameters, where the positioning of the bound parameters would be reversed versus the statement itself when using MySQL's special syntax. [ticket:2768]
* add an ORDER BY hereMike Bayer2013-06-261-2/+2
|
* - rework of correlation, continuing on #2668, #2746Mike Bayer2013-06-262-12/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add support for correlations to propagate all the way in; because correlations require context now, need to make sure a select enclosure of any level takes effect any number of levels deep. - fix what we said correlate_except() was supposed to do when we first released #2668 - "the FROM clause is left intact if the correlated SELECT is not used in the context of an enclosing SELECT..." - it was not considering the "existing_froms" collection at all, and prohibited additional FROMs from being placed in an any() or has(). - add test for multilevel any() - lots of docs, including glossary entries as we really need to define "WHERE clause", "columns clause" etc. so that we can explain correlation better - based on the insight that a SELECT can correlate anything that ultimately came from an enclosing SELECT that links to this one via WHERE/columns/HAVING/ORDER BY, have the compiler keep track of the FROM lists that correspond in this way, link it to the asfrom flag, so that we send to _get_display_froms() the exact list of candidate FROMs to correlate. no longer need any asfrom logic in the Select() itself - preserve 0.8.1's behavior for correlation when no correlate options are given, not to mention 0.7 and prior's behavior of not propagating implicit correlation more than one level.. this is to reduce surprises/hard-to-debug situations when a user isn't trying to correlate anything. Conflicts: doc/build/changelog/changelog_08.rst doc/build/changelog/changelog_09.rst lib/sqlalchemy/sql/compiler.py
* 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] Conflicts: doc/build/changelog/changelog_09.rst
* Fixed bug whereby joining a select() of a table "A" with multipleMike Bayer2013-06-032-7/+40
| | | | | | | | | | | foreign key paths to a table "B", to that table "B", would fail to produce the "ambiguous join condition" error that would be reported if you join table "A" directly to "B"; it would instead produce a join condition with multiple criteria. [ticket:2738] Conflicts: doc/build/changelog/changelog_09.rst
* - remove the ``__iter__()`` with notimplemented since it interferesMike Bayer2013-06-031-7/+6
| | | | | | | with legitimate iterable detection, [ticket:2726] Conflicts: doc/build/changelog/changelog_09.rst
* fix this testMike Bayer2013-05-261-1/+1
|
* cleanupMike Bayer2013-05-041-67/+68
|
* formatting stuffMike Bayer2013-05-041-49/+51
|
* Fully implemented the IS and IS NOT operators withMike Bayer2013-04-221-1/+28
| | | | | | | | | | regards to the True/False constants. An expression like ``col.is_(True)`` will now render ``col IS true`` on the target platform, rather than converting the True/ False constant to an integer bound parameter. This allows the ``is_()`` operator to work on MySQL when given True/False constants. [ticket:2682]
* - Improvements to the operation of the pymysql dialect onMike Bayer2013-04-211-20/+6
| | | | | | | | Python 3, including some important decode/bytes steps. Issues remain with BLOB types due to driver issues. Courtesy Ben Trofatter. - start using util.py3k, we will eventually remove the sa2to3 fixer entirely
* Merged in bentrofatter/sqlalchemy-2663 (pull request #49)Mike Bayer2013-04-211-1/+10
|\ | | | | | | Fixed PyMySQL problems for Python 2.x and mitigated some issues with Python 3.x
| * Removed commented line from test_types.pyBen Trofatter2013-03-191-1/+0
| |
| * Added workaround for pymysql3 double wrapping ProgrammingErrors to pymysql ↵Ben Trofatter2013-03-181-1/+11
| | | | | | | | | | | | dialect. Added workaround for pymysql3 return a bytes object when queried for isolation level.
* | A major fix to the way in which a select() object producesMike Bayer2013-04-112-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | labeled columns when apply_labels() is used; this mode produces a SELECT where each column is labeled as in <tablename>_<columnname>, to remove column name collisions for a multiple table select. The fix is that if two labels collide when combined with the table name, i.e. "foo.bar_id" and "foo_bar.id", anonymous aliasing will be applied to one of the dupes. This allows the ORM to handle both columns independently; previously, 0.7 would in some cases silently emit a second SELECT for the column that was "duped", and in 0.8 an ambiguous column error would be emitted. The "keys" applied to the .c. collection of the select() will also be deduped, so that the "column being replaced" warning will no longer emit for any select() that specifies use_labels, though the dupe key will be given an anonymous label which isn't generally user-friendly. [ticket:2702]
* | - reinstate insert returning back into test_insert.py; defaultdialectMike Bayer2013-04-012-4/+10
| | | | | | | | needs to be explicit here since tablestest sticks testing.db onto metadata.bind
* | moving insert returning test back into CRUD test class until I figure out ↵Diana Clarke2013-03-302-7/+5
| | | | | | | | why moving it broke the oracle/postgres builds
* | whitespaceDiana Clarke2013-03-301-3/+3
| |
* | move the update tests from CRUDTest into sql/test_update.py (see #2630)Diana Clarke2013-03-302-105/+173
| |
* | fixing tests for --db=mysql: VARCHAR requires a length on dialect mysqlDiana Clarke2013-03-302-6/+6
| |
* | starting on the update tests next, pep8 pass first (see #2630)Diana Clarke2013-03-302-301/+272
| |
* | move the insert tests from CRUDTest into sql/test_insert.py (see #2630)Diana Clarke2013-03-292-219/+310
| |
* | move the delete tests from CRUDTest into sql/test_delete.py (see #2630)Diana Clarke2013-03-292-46/+87
| |
* | fix syntax errorMike Bayer2013-03-241-1/+1
| |
* | Fixed bug whereby a DBAPI that can return "0"Mike Bayer2013-03-231-1/+18
|/ | | | | for cursor.lastrowid would not function correctly in conjunction with :attr:`.ResultProxy.inserted_primary_key`.
* merge plus fix the test spelling tooMike Bayer2013-03-181-2/+2
|
* - auto-append for CheckConstraint should skip table if the expression is againstMike Bayer2013-03-091-0/+13
| | | | a lower-case-t table
* - remove all compat items that are pre-2.5 (hooray)Mike Bayer2013-03-092-2/+1
| | | | | | - other cleanup - don't need compat.decimal, that approach never panned out. hopefully outside libs aren't pulling it in, they shouldn't be
* - this test is ridiculous, executemany() + returning not supportedMike Bayer2013-03-091-20/+0
|
* - the base correlate tests in test_compiler cover the ones that were hereMike Bayer2013-03-091-127/+79
| | | | | for now - fix up adaptation tests to still try to exercise the correlation argument
* - since correlation is now always at least semi-automatic, remove theMike Bayer2013-03-091-33/+241
| | | | | | ability for correlation to have any effect for a SELECT that's stated in the FROM. - add a new exhaustive test suite for correlation to test_compiler
* go back to the original form, then break out this test into individualsMike Bayer2013-03-081-53/+115
| | | | so it can be managed more easily