summaryrefslogtreecommitdiff
path: root/test/sql/selectable.py
Commit message (Collapse)AuthorAgeFilesLines
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-526/+0
| | | | | See README.unittests for information on how to run the tests. [ticket:970]
* - Fixed some deep "column correspondence" issues which couldMike Bayer2009-01-031-17/+33
| | | | | | | | impact a Query made against a selectable containing multiple versions of the same table, as well as unions and similar which contained the same table columns in different column positions at different levels. [ticket:1268]
* merged -r5299:5438 of py3k warnings branch. this fixes some sqlite py2.6 ↵Mike Bayer2008-12-181-14/+15
| | | | | | | | testing issues, and also addresses a significant chunk of py3k deprecations. It's mainly expicit __hash__ methods. Additionally, most usage of sets/dicts to store columns uses util-based placeholder names.
* - Improved the behavior of aliased() objects such that they moreMike Bayer2008-11-031-50/+79
| | | | | | | | | | | accurately adapt the expressions generated, which helps particularly with self-referential comparisons. [ticket:1171] - Fixed bug involving primaryjoin/secondaryjoin conditions constructed from class-bound attributes (as often occurs when using declarative), which later would be inappropriately aliased by Query, particularly with the various EXISTS based comparators.
* revert r5220 inadvertently committed to trunkMike Bayer2008-11-021-16/+1
|
* progress so farMike Bayer2008-11-021-1/+16
|
* - 0.5.0rc3, dohMike Bayer2008-10-181-20/+0
| | | | | | | | | | | | - The internal notion of an "OID" or "ROWID" column has been removed. It's basically not used by any dialect, and the possibility of its usage with psycopg2's cursor.lastrowid is basically gone now that INSERT..RETURNING is available. - Removed "default_order_by()" method on all FromClause objects. - profile/compile/select test is 8 function calls over on buildbot 2.4 for some reason, will adjust after checking the results of this commit
* - fixed a fairly critical bug in clause adaption/corresponding column in ↵Mike Bayer2008-05-091-13/+33
| | | | | | | conjunction with annotations - implicit order by is removed, modified many tests to explicitly set ordering, probably many more to go once it hits the buildbot.
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-6/+6
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* - _Label adds itself to the proxy collection so that it works in ↵Mike Bayer2008-05-061-0/+9
| | | | | | correspoinding column. fixes some eager load with column_property bugs. - this partially fixes some issues in [ticket:1022] but leaving the "unlabeled" fix for 0.5 for now
* - an unfortunate naming conflictMike Bayer2008-05-021-1/+1
| | | | - needed sql import on and()
* - factored out the logic used by Join to create its join conditionMike Bayer2008-05-021-0/+13
| | | | | | | - With declarative, joined table inheritance mappers use a slightly relaxed function to create the "inherit condition" to the parent table, so that other foreign keys to not-yet-declared Table objects don't trigger an error.
* - merged -r4458:4466 of query_columns branchMike Bayer2008-04-071-1/+1
| | | | | | | - this branch changes query.values() to immediately return an iterator, adds a new "aliased" construct which will be the primary method to get at aliased columns when using values() - tentative ORM versions of _join and _outerjoin are not yet public, would like to integrate with Query better (work continues in the branch) - lots of fixes to expressions regarding cloning and correlation. Some apparent ORM bug-workarounds removed. - to fix a recursion issue with anonymous identifiers, bind parameters generated against columns now just use the name of the column instead of the tablename_columnname label (plus the unique integer counter). this way expensive recursive schemes aren't needed for the anon identifier logic. This, as usual, impacted a ton of compiler unit tests which needed a search-n-replace for the new bind names.
* - fixed bug introduced in r4070 where union() and other compound selects ↵Mike Bayer2008-02-121-0/+10
| | | | | | | would not get an OID column if it only contained one selectable element, due to missing return in _proxy_column() - visit_column() calls itself to render a primary key col being used as the interpretation of the oid col instead of relying upon broken partial logic
* - updated the naming scheme of the base test classes in test/testlib/testing.py;Mike Bayer2008-02-111-4/+4
| | | | | tests extend from either TestBase or ORMTest, using additional mixins for special assertion methods as needed
* more capability added to reduce_columnsMike Bayer2008-01-231-0/+19
|
* - some expression fixup:Mike Bayer2008-01-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | - the '.c.' attribute on a selectable now gets an entry for every column expression in its columns clause; previously, "unnamed" columns like functions and CASE statements weren't getting put there. Now they will, using their full string representation if no 'name' is available. - The anonymous 'label' generated for otherwise unlabeled functions and expressions now propagates outwards at compile time for expressions like select([select([func.foo()])]) - a CompositeSelect, i.e. any union(), union_all(), intersect(), etc. now asserts that each selectable contains the same number of columns. This conforms to the corresponding SQL requirement. - building on the above ideas, CompositeSelects now build up their ".c." collection based on the names present in the first selectable only; corresponding_column() now works fully for all embedded selectables.
* finally, a really straightforward reduce() method which reduces colsMike Bayer2008-01-151-0/+119
| | | | | | | to the minimal set for every test case I can come up with, and now replaces all the cruft in Mapper._compile_pks() as well as Join.__init_primary_key(). mappers can now handle aliased selects and figure out the correct PKs pretty well [ticket:933]
* - testbase is gone, replaced by testenvJason Kirtland2008-01-121-2/+2
| | | | | | - Importing testenv has no side effects- explicit functions provide similar behavior to the old immediate behavior of testbase - testing.db has the configured db - Fixed up the perf/* scripts
* - Undeclared SAWarnings are now fatal to tests as well.Jason Kirtland2008-01-121-36/+36
| | | | - Fixed typo that was killing runs of individual named tests.
* - cleanup; lambdas removed from properties; properties mirror same-named ↵Mike Bayer2007-12-181-0/+4
| | | | | | functions (more like eventual decorator syntax); remove some old methods, factor out some "raiseerr" ugliness to outer lying functions. - corresponding_column() integrates "require_embedded" flag with other set arithmetic
* - more query testsMike Bayer2007-12-101-1/+4
| | | | | | | | | - trying to refine some of the adaptation stuff - query.from_statement() wont allow further generative criterion - added a warning to columncollection when selectable is formed with conflicting columns (only in the col export phase) - some method rearrangement on schema/columncollection.... - property conflicting relation warning doesnt raise for concrete
* - generation of "unique" bind parameters has been simplified to use the sameMike Bayer2007-12-061-1/+1
| | | | | | | | | | "unique identifier" mechanisms as everything else. This doesn't affect user code, except any code that might have been hardcoded against the generated names. Generated bind params now have the form "<paramname>_<num>", whereas before only the second bind of the same name would have this form. - bindparam() objects themselves can be used as keys for execute(), i.e. statement.execute({bind1:'foo', bind2:'bar'})
* - oid_column proxies more intelligently off of Select, CompoundSelect - ↵Mike Bayer2007-11-051-0/+17
| | | | | | | | fixes platform-affected bugs in missing the correct "oid" column - locate_all_froms() is expensive; added an attribute-level cache for it - put a huge warning on all select.append_XXX() methods stating that derived collections like locate_all_froms() may become invalid if already initialized
* - rewrote and simplified the system used to "target" columns acrossMike Bayer2007-11-051-2/+2
| | | | | | | | | | | | | | | | | | selectable expressions. On the SQL side this is represented by the "corresponding_column()" method. This method is used heavily by the ORM to "adapt" elements of an expression to similar, aliased expressions, as well as to target result set columns originally bound to a table or selectable to an aliased, "corresponding" expression. The new rewrite features completely consistent and accurate behavior. - the "orig_set" and "distance" elements as well as all associated fanfare are gone (hooray !) - columns now have an optional "proxies" list which is a list of all columns they are a "proxy" for; only CompoundSelect cols proxy more than one column (just like before). set operations are used to determine lineage. - CompoundSelects (i.e. unions) only create one public-facing proxy column per column name. primary key collections come out with just one column per embedded PK column. - made the alias used by eager load limited subquery anonymous.
* - eager loading with LIMIT/OFFSET applied no longer adds the primaryMike Bayer2007-11-031-1/+21
| | | | | | | table joined to a limited subquery of itself; the eager loads now join directly to the subquery which also provides the primary table's columns to the result set. This eliminates a JOIN from all eager loads with LIMIT/OFFSET. [ticket:843]
* - rewritten ClauseAdapter merged from the eager_minus_join branch; this is a ↵Mike Bayer2007-11-031-0/+33
| | | | | | | | much simpler and "correct" version which will copy all elements exactly once, except for those which were replaced with target elements. It also can match a wider variety of target elements including joins and selects on identity alone.
* set svn:eol-style nativeJason Kirtland2007-10-131-235/+235
|
* [ticket:768] dont assume join criterion consists only of column objectsMike Bayer2007-09-081-0/+8
|
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-18/+14
| | | | maintenance branch in branches/rel_0_3.
* - improved ability to get the "correct" and most minimal set of primary keyMike Bayer2007-07-141-0/+55
| | | | | | | columns from a join, equating foreign keys and otherwise equated columns. this is also mostly to help inheritance scenarios formulate the best choice of primary key columns. [ticket:185] - added 'bind' argument to Sequence.create()/drop(), ColumnDefault.execute()
* changed "_source_column" to simpler "_distance"Mike Bayer2007-07-101-0/+2
|
* more "column targeting" enhancements..columns have a "depth" from their ↵Mike Bayer2007-07-101-2/+27
| | | | ultimate source column so that corresponding_column() can find the column that is "closest" (i.e. fewest levels of proxying) to the requested column
* extra test for corresponding column fixMike Bayer2007-06-071-0/+5
|
* - fixed bug where selectable.corresponding_column(selectable.c.col)Mike Bayer2007-06-061-0/+7
| | | | | | would not return selectable.c.col, if the selectable is a join of a table and another join involving the same table. messed up ORM decision making [ticket:593]
* - made kwargs parsing to Table strict; removed various obsoluete ↵Mike Bayer2006-11-261-2/+1
| | | | | | | | | | | "redefine=True" kw's from the unit tests - documented instance variables in ANSICompiler - fixed [ticket:120], adds "inline_params" set to ANSICompiler which DefaultDialect picks up on when determining defaults. added unittests to query.py - additionally fixed up the behavior of the "values" parameter on _Insert/_Update - more cleanup to sql/Select - more succinct organization of FROM clauses, removed silly _process_from_dict methods and JoinMarker object
* reorganized unit tests into subdirectoriesMike Bayer2006-06-051-0/+138