summaryrefslogtreecommitdiff
path: root/test/sql/test_cte.py
Commit message (Collapse)AuthorAgeFilesLines
* Make all tests to be PEP8 compliantKhairi Hafsham2017-02-071-2/+3
| | | | | | | | tested using pycodestyle version 2.2.0 Fixes: #3885 Change-Id: I5df43adc3aefe318f9eeab72a078247a548ec566 Pull-request: https://github.com/zzzeek/sqlalchemy/pull/343
* Propagate execution_options at compile stageMike Bayer2016-10-051-1/+8
| | | | | | | | Compiler can now set up execution options and additionally will propagate autocommit from embedded CTEs. Change-Id: I19db7b8fe4d84549ea95342e8d2040189fed1bbe Fixes: #3805
* Ensure DML provides named_with_column for CTE(Alias)Mike Bayer2016-07-131-0/+32
| | | | | | | | | | | | Fixed bug in new CTE feature for update/insert/delete whereby an anoymous (e.g. no name passed) :class:`.CTE` construct around the statement would fail. The Alias base class of CTE checks for the "named_with_column" attribute in order to detect if the underlying selectable has a name; UpdateBase now provides this as False. Change-Id: I4b0309db21379a4c0cb93085298c86da3cf840e4 Fixes: #3744
* - CTE functionality has been expanded to support all DML, allowingMike Bayer2016-02-111-2/+150
| | | | | | | INSERT, UPDATE, and DELETE statements to both specify their own WITH clause, as well as for these statements themselves to be CTE expressions when they include a RETURNING clause. fixes #2551
* PEP8 cleanup in /test/sqlEric Streeper2015-03-181-1/+1
|
* - Added support for CTEs under Oracle. This includes some tweaksMike Bayer2014-12-041-0/+30
| | | | | | | to the aliasing syntax, as well as a new CTE feature :meth:`.CTE.suffix_with`, which is useful for adding in special Oracle-specific directives to the CTE. fixes #3220
* - Fixed bug in CTE where ``literal_binds`` compiler argument would notMike Bayer2014-08-021-0/+38
| | | | | | be always be correctly propagated when one CTE referred to another aliased CTE in a statement. Fixes #3154
* - update the flake8 rules againMike Bayer2014-07-181-180/+172
| | | | - apply autopep8 + manual fixes to most of test/sql/
* -Fixed bug in common table expressions whereby positional boundMike Bayer2014-07-141-0/+36
| | | | | | parameters could be expressed in the wrong final order when CTEs were nested in certain ways. fixes #3090
* - reverse order of columns in sample CTEs as this is a UNION and the cols ↵Mike Bayer2014-04-021-5/+5
| | | | | | | | | | need to line up - alter this in the unit tests as well as these queries were just copied from the tests - remove the included_parts.join(parts) from the core CTE doc (also just copied from the test, where we want to make sure joins don't get screwed up with the CTE) as it doesn't contribute to the query itself fixes #3014
* 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]
* - 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.8.3, 0.7.11. [ticket:2783]
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-2/+2
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* - [feature] The before_cursor_execute eventMike Bayer2012-08-231-0/+1
| | | | | | | | | fires off for so-called "_cursor_execute" events, which are usually special-case executions of primary-key bound sequences and default-generation SQL phrases that invoke separately when RETURNING is not used with INSERT. [ticket:2459]
* - [bug] Fixed more un-intuitivenesses in CTEsMike Bayer2012-07-101-20/+159
| | | | | | | | | | | | | | | | which prevented referring to a CTE in a union of itself without it being aliased. CTEs now render uniquely on name, rendering the outermost CTE of a given name only - all other references are rendered just as the name. This even includes other CTE/SELECTs that refer to different versions of the same CTE object, such as a SELECT or a UNION ALL of that SELECT. We are somewhat loosening the usual link between object identity and lexical identity in this case. A true name conflict between two unrelated CTEs now raises an error.
* - move cte tests into their own test/sql/test_cte.pyMike Bayer2012-06-251-0/+213
- rework bindtemplate system of "numbered" params by applying the numbers last, as we now need to generate these out of order in some cases - add positional assertion to assert_compile - add new cte_positional collection to track bindparams generated within cte visits; splice this onto the beginning of self.positiontup at cte render time, [ticket:2521]