summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/selectable.py
Commit message (Collapse)AuthorAgeFilesLines
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-242/+266
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - Fixed a SQLite join rewriting issue where a subquery that is embeddedMike Bayer2014-07-151-0/+1
| | | | | | | | as a scalar subquery such as within an IN would receive inappropriate substitutions from the enclosing query, if the same table were present inside the subquery as were in the enclosing query such as in a joined inheritance scenario. fixes #3130
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - Fixed bug in INSERT..FROM SELECT construct where selecting from aMike Bayer2014-05-251-1/+1
| | | | | UNION would wrap the union in an anonymous (e.g. unlabled) subquery. fixes #3044
* - more tests, including backend testsMike Bayer2014-05-161-30/+54
| | | | - implement for SQL server, use window functions when simple limit/offset not available
* Merge branch 'issue_3034' of ↵Mike Bayer2014-05-161-7/+68
|\ | | | | | | https://bitbucket.org/dobesv/sqlalchemy/branch/issue_3034 into ticket_3034
| * Remove unused importDobes Vandermeer2014-05-091-6/+29
| |
| * Remove unused importDobes Vandermeer2014-04-251-1/+1
| |
| * Use _offset_clause and _limit_clause, which are always Visitable and usually ↵Dobes Vandermeer2014-04-251-11/+41
| | | | | | | | a BindParameter, instead of _offset and _limit in GenerativeSelect.
| * Proof-of-concept implementation of supporting bindparam for offset and limit ↵Dobes Vandermeer2014-04-241-4/+12
| | | | | | | | on a query.
* | Documentation fix-up: "its" vs. "it's"pr/91Matthias Urlichs2014-05-111-1/+1
| | | | | | | | | | | | | | | | | | Removed ungrammatical apostrophes from documentation, replacing "it's" with "its" where appropriate (but in a few cases with "it is" when that read better). While doing that, I also fixed a couple of minor typos etc. as I noticed them.
* | Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-3/+3
|/ | | | Found using: https://github.com/intgr/topy
* escape backslashMike Bayer2014-04-021-1/+1
|
* - reverse order of columns in sample CTEs as this is a UNION and the cols ↵Mike Bayer2014-04-021-3/+1
| | | | | | | | | | 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
* - back off the callcounts a bit for the boolean fixMike Bayer2014-04-011-3/+4
| | | | - rewrite callcounts for select()
* - Fixes to the newly enhanced boolean coercion in :ticket:`2804` whereMike Bayer2014-04-011-2/+2
| | | | | | | the new rules for "where" and "having" woudn't take effect for the "whereclause" and "having" kw arguments of the :func:`.select` construct, which is also what :class:`.Query` uses so wasn't working in the ORM either. fixes #3013 re: #2804
* - add further coverage for join_condition to make sure we get this case whereMike Bayer2014-03-281-1/+1
| | | | there are multiple, equivalent foreign keys
* - fix set syntax supposed to be dictMike Bayer2014-03-281-1/+1
|
* - fix py3k bug re: dictionary values(), fixes #3005Mike Bayer2014-03-281-1/+1
|
* - Improved the check for "how to join from A to B" such that whenMike Bayer2014-03-271-16/+34
| | | | | | | | | a table has multiple, composite foreign keys targeting a parent table, the :paramref:`.relationship.foreign_keys` argument will be properly interpreted in order to resolve the ambiguity; previously this condition would raise that there were multiple FK paths when in fact the foreign_keys argument should be establishing which one is expected. fixes #2965
* - Some changes to how the :attr:`.FromClause.c` collection behavesMike Bayer2014-02-261-7/+8
| | | | | | | | | | | | | | | | | | | | | | | when presented with duplicate columns. The behavior of emitting a warning and replacing the old column with the same name still remains to some degree; the replacement in particular is to maintain backwards compatibility. However, the replaced column still remains associated with the ``c`` collection now in a collection ``._all_columns``, which is used by constructs such as aliases and unions, to deal with the set of columns in ``c`` more towards what is actually in the list of columns rather than the unique set of key names. This helps with situations where SELECT statements with same-named columns are used in unions and such, so that the union can match the columns up positionally and also there's some chance of :meth:`.FromClause.corresponding_column` still being usable here (it can now return a column that is only in selectable.c._all_columns and not otherwise named). The new collection is underscored as we still need to decide where this list might end up. Theoretically it would become the result of iter(selectable.c), however this would mean that the length of the iteration would no longer match the length of keys(), and that behavior needs to be checked out. fixes #2974 - add a bunch more tests for ColumnCollection
* - More fixes to SQLite "join rewriting"; the fix from :ticket:`2967`Mike Bayer2014-02-201-0/+11
| | | | | | | | | | | | | | implemented right before the release of 0.9.3 affected the case where a UNION contained nested joins in it. "Join rewriting" is a feature with a wide range of possibilities and is the first intricate "SQL rewriting" feature we've introduced in years, so we're sort of going through a lot of iterations with it (not unlike eager loading back in the 0.2/0.3 series, polymorphic loading in 0.4/0.5). We should be there soon so thanks for bearing with us :). fixes #2969 re: #2967 - solve the issue of join rewriting inspecting various types of from objects without using isinstance(), by adding some new underscored inspection flags to the FromClause hierarchy.
* - Fixed bug in new :class:`.TextAsFrom` construct where :class:`.Column`-Mike Bayer2014-02-021-0/+6
| | | | | | | | | | oriented row lookups were not matching up to the ad-hoc :class:`.ColumnClause` objects that :class:`.TextAsFrom` generates, thereby making it not usable as a target in :meth:`.Query.from_statement`. Also fixed :meth:`.Query.from_statement` mechanics to not mistake a :class:`.TextAsFrom` for a :class:`.Select` construct. This bug is also an 0.9 regression as the :meth:`.Text.columns` method is called to accommodate the :paramref:`.text.typemap` argument. [ticket:2932]
* seealsos in the tutorialMike Bayer2014-01-251-0/+4
|
* lets document join()Mike Bayer2014-01-241-20/+94
|
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - fix some docstring stuffMike Bayer2014-01-051-0/+8
|
* - call it 0.9.0Mike Bayer2013-12-301-4/+4
|
* - add support for bindparam() called from AsFromTextMike Bayer2013-11-291-0/+4
| | | | | - get PG dialect to work around "no nonexistent binds" rule for now, though we might want to reconsider this behavior
* Merge pull request #46 from vrajmohan/mastermike bayer2013-11-291-1/+1
|\ | | | | More fixes for cross references and reducing warnings (3rd wave)
| * Fix cross referencespr/46Vraj Mohan2013-11-171-1/+1
| |
* | fixMike Bayer2013-11-291-1/+1
| |
* | - New improvements to the :func:`.text` construct, includingMike Bayer2013-11-291-114/+181
| | | | | | | | | | | | | | | | more flexible ways to set up bound parameters and return types; in particular, a :func:`.text` can now be turned into a full FROM-object, embeddable in other statements as an alias or CTE using the new method :meth:`.TextClause.columns`. [ticket:2877]
* | - add support for specifying tables or entities for "of"Mike Bayer2013-11-281-27/+36
| | | | | | | | | | - implement Query with_for_update() - rework docs and tests
* | - fix up rendering of "of"Mike Bayer2013-11-281-6/+12
| | | | | | | | | | | | - move out tests, dialect specific out of compiler, compiler tests use new API, legacy API tests in test_selecatble - add support for adaptation of ForUpdateArg, alias support in compilers
* | - work in progress, will squashMike Bayer2013-11-281-11/+130
| |
* | Merge branch 'for_update_of' of github.com:mlassnig/sqlalchemy into ↵Mike Bayer2013-11-281-1/+0
|\ \ | | | | | | | | | for_update_of
| * | added LockmodeArgspr/42Mario Lassnig2013-11-281-3/+0
| | |
| * | add psql FOR UPDATE OF functionalityMario Lassnig2013-11-121-0/+2
| | |
* | | - Fixed bug which prevented the ``serializer`` extension from workingMike Bayer2013-11-211-1/+1
| |/ |/| | | | | | | correctly with table or column names that contain non-ASCII characters. [ticket:2869]
* | Ensure API generation and fix cross referencesVraj Mohan2013-11-131-2/+2
| |
* | Fix indentation issues in docstringspr/43Vraj Mohan2013-11-121-5/+5
| |
* | Fix cross referencesVraj Mohan2013-11-121-4/+5
|/
* An overhaul of expression handling for special symbols particularlyMike Bayer2013-10-231-11/+5
| | | | | | | | | | with conjunctions, e.g. ``None`` :func:`.expression.null` :func:`.expression.true` :func:`.expression.false`, including consistency in rendering NULL in conjunctions, "short-circuiting" of :func:`.and_` and :func:`.or_` expressions which contain boolean constants, and rendering of boolean constants and expressions as compared to "1" or "0" for backends that don't feature ``true``/``false`` constants. [ticket:2804]
* A :func:`.select` that is made to refer to itself in its FROM clause,Mike Bayer2013-10-081-0/+3
| | | | | | typically via in-place mutation, will raise an informative error message rather than causing a recursion overflow. [ticket:2815]
* - A rework to the way that "quoted" identifiers are handled, in thatMike Bayer2013-08-271-1/+0
| | | | | | | | | | | | | | | | instead of relying upon various ``quote=True`` flags being passed around, these flags are converted into rich string objects with quoting information included at the point at which they are passed to common schema constructs like :class:`.Table`, :class:`.Column`, etc. This solves the issue of various methods that don't correctly honor the "quote" flag such as :meth:`.Engine.has_table` and related methods. The :class:`.quoted_name` object is a string subclass that can also be used explicitly if needed; the object will hold onto the quoting preferences passed and will also bypass the "name normalization" performed by dialects that standardize on uppercase symbols, such as Oracle, Firebird and DB2. The upshot is that the "uppercase" backends can now work with force-quoted names, such as lowercase-quoted names and new reserved words. [ticket:2812]
* additoinalMike Bayer2013-08-181-2/+19
|
* - A large refactoring of the ``sqlalchemy.sql`` package has reorganizedMike Bayer2013-08-121-0/+2775
the import structure of many core modules. ``sqlalchemy.schema`` and ``sqlalchemy.types`` remain in the top-level package, but are now just lists of names that pull from within ``sqlalchemy.sql``. Their implementations are now broken out among ``sqlalchemy.sql.type_api``, ``sqlalchemy.sql.sqltypes``, ``sqlalchemy.sql.schema`` and ``sqlalchemy.sql.ddl``, the last of which was moved from ``sqlalchemy.engine``. ``sqlalchemy.sql.expression`` is also a namespace now which pulls implementations mostly from ``sqlalchemy.sql.elements``, ``sqlalchemy.sql.selectable``, and ``sqlalchemy.sql.dml``. Most of the "factory" functions used to create SQL expression objects have been moved to classmethods or constructors, which are exposed in ``sqlalchemy.sql.expression`` using a programmatic system. Care has been taken such that all the original import namespaces remain intact and there should be no impact on any existing applications. The rationale here was to break out these very large modules into smaller ones, provide more manageable lists of function names, to greatly reduce "import cycles" and clarify the up-front importing of names, and to remove the need for redundant functions and documentation throughout the expression package.