summaryrefslogtreecommitdiff
path: root/test/sql/test_delete.py
Commit message (Collapse)AuthorAgeFilesLines
* zimports for all of test/Mike Bayer2019-01-051-19/+16
|
* step 1, straight black -l 79 runMike Bayer2019-01-051-137/+193
| | | | includes adjustment to setup.py to recognize __version__ correctly
* Move CRUDTest, InlineDefaultTest from test_compilerMike Bayer2018-12-011-0/+10
| | | | | | | | | | | test_compiler is mostly related to SELECT statements as well as smaller SQL elements. While it still has some DDL related tests, move out all the remaining insert/update tests into the already present test_insert.py, test_update.py Fixes: #2630 Change-Id: I4167618543fd1235d12d1717c8c629d2374b325a (cherry picked from commit 87cdda008673e01e2c32049f103e9cdebd2a5d77)
* Include UPDATE/DELETE extra_froms in correlationMike Bayer2018-08-041-2/+74
| | | | | | | | | | | | | | | | | | Fixed bug where the multi-table support for UPDATE and DELETE statements did not consider the additional FROM elements as targets for correlation, when a correlated SELECT were also combined with the statement. This change now includes that a SELECT statement in the WHERE clause for such a statement will try to auto-correlate back to these additional tables in the parent UPDATE/DELETE or unconditionally correlate if :meth:`.Select.correlate` is used. Note that auto-correlation raises an error if the SELECT statement would have no FROM clauses as a result, which can now occur if the parent UPDATE/DELETE specifies the same tables in its additional set of tables ; specify :meth:`.Select.correlate` explicitly to resolve. Change-Id: Ie11eaad7e49af3f59df11691b104d6359341bdae Fixes: #4313 (cherry picked from commit abeea1d82db34232bbef01e98fa4d1de0f583eb6)
* Allow delete where clause to refer multiple tables.inytar2017-12-051-2/+143
| | | | | | | | | | | | | | | | | | | | | Implemented "DELETE..FROM" syntax for Postgresql, MySQL, MS SQL Server (as well as within the unsupported Sybase dialect) in a manner similar to how "UPDATE..FROM" works. A DELETE statement that refers to more than one table will switch into "multi-table" mode and render the appropriate "USING" or multi-table "FROM" clause as understood by the database. Pull request courtesy Pieter Mulder. For SQL syntaxes see: Postgresql: https://www.postgresql.org/docs/current/static/sql-delete.html MySQL: https://dev.mysql.com/doc/refman/5.7/en/delete.html#multiple-table_syntax MSSQL: https://docs.microsoft.com/en-us/sql/t-sql/statements/delete-transact-sql Sybase: http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc00801.1510/html/iqrefso/X315721.htm Co-authored by: Mike Bayer <mike_mp@zzzcomputing.com> Change-Id: I6dfd57b49e44a095d076dc493cd2360bb5d920d3 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/392 Fixes: #959
* - update the flake8 rules againMike Bayer2014-07-181-19/+22
| | | | - apply autopep8 + manual fixes to most of test/sql/
* - Fixed bug where :meth:`.Table.update` and :meth:`.Table.delete`Mike Bayer2014-05-081-1/+13
| | | | | | | would produce an empty WHERE clause when an empty :func:`.and_()` or :func:`.or_()` or other blank expression were applied. This is now consistent with that of :func:`.select`. fixes #3045
* fixing tests for --db=mysql: VARCHAR requires a length on dialect mysqlDiana Clarke2013-03-301-3/+3
|
* move the delete tests from CRUDTest into sql/test_delete.py (see #2630)Diana Clarke2013-03-291-0/+86