summaryrefslogtreecommitdiff
path: root/test/sql
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed bug where :meth:`.in_()` would go into an endless loop ifMike Bayer2014-02-131-0/+33
| | | | | | erroneously passed a column expression whose comparator included the ``__getitem__()`` method, such as a column that uses the :class:`.postgresql.ARRAY` type. [ticket:2957]
* - add a test for pullreq github:63Mike Bayer2014-01-311-0/+7
|
* - add a test for [ticket:2927], which is an 0.9 issue but only because 0.8Mike Bayer2014-01-291-0/+9
| | | | isn't annotating correctly
* - add tests for [ticket:2918], confirm this is an 0.9 regressionMike Bayer2014-01-231-0/+12
|
* - Fixed issue where a primary key column that has a Sequence on it,Mike Bayer2013-12-201-0/+28
| | | | | | | | | 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]
* - Fixed bug with :meth:`.Insert.from_select` method where the orderMike Bayer2013-12-191-0/+29
| | | | | | | | 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]
* - for [ticket:2651], leaving CheckConstraint alone, preferring to keepMike Bayer2013-12-161-1/+2
| | | | | | | | | | | | 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. Conflicts: lib/sqlalchemy/sql/schema.py
* - Fixed bug where SQL statement would be improperly ASCII-encodedMike Bayer2013-11-221-1/+1
| | | | | | | | | | when a pre-DBAPI :class:`.StatementError` were raised within :meth:`.Connection.execute`, causing encoding errors for non-ASCII statements. The stringification now remains within Python unicode thus avoiding encoding errors. [ticket:2871] Conflicts: test/engine/test_execute.py
* disable this test for py3k, this is better fixed in 0.9Mike Bayer2013-11-211-6/+7
|
* - add a sanity-check test for repr(), comparing against what we getMike Bayer2013-11-211-1/+13
| | | | in 0.9 for [ticket:2868]
* - 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
| |