summaryrefslogtreecommitdiff
path: root/test/orm/generative.py
Commit message (Collapse)AuthorAgeFilesLines
* - unit tests have been migrated from unittest to nose.Mike Bayer2009-06-101-279/+0
| | | | | See README.unittests for information on how to run the tests. [ticket:970]
* Modified fails_on testing decorator to take a reason for the failure.Michael Trier2008-12-121-3/+4
| | | | | This should assist with helping to document the reasons for testing failures. Currently unspecified failures are defaulted to 'FIXME: unknown'.
* Corrected and verified a few more mssql tests.Michael Trier2008-12-121-2/+2
|
* - Fixed up slices on Query (i.e. query[x:y]) to work properlyMike Bayer2008-09-281-0/+6
| | | | | for zero length slices, slices with None on either end. [ticket:1177]
* - Removed 2.3 set emulations/enhancements.Jason Kirtland2008-07-151-1/+0
| | | | (sets.Set-based collections & DB-API returns still work.)
* - removed query.min()/max()/sum()/avg(). these should be called using ↵Mike Bayer2008-06-021-7/+8
| | | | | | | | column arguments or values in conjunction with func. - fixed [ticket:1008], count() works with single table inheritance - changed the relationship of InstrumentedAttribute to class such that each subclass in an inheritance hierarchy gets a unique InstrumentedAttribute per column-oriented attribute, including for the same underlying ColumnProperty. This allows expressions from subclasses to be annotated accurately so that Query can get a hold of the exact entities to be queried when using column-based expressions. This repairs various polymorphic scenarios with both single and joined table inheritance. - still to be determined is what does something like query(Person.name, Engineer.engineer_info) do; currently it's problematic. Even trickier is query(Person.name, Engineer.engineer_info, Manager.manager_name)
* - Removed @unsupportedJason Kirtland2008-05-141-1/+1
|
* Test suite modernization in progress. Big changes:Jason Kirtland2008-05-091-167/+198
| | | | | | | | | | | - @unsupported now only accepts a single target and demands a reason for not running the test. - @exclude also demands an exclusion reason - Greatly expanded @testing.requires.<feature>, eliminating many decorators in the suite and signficantly easing integration of multi-driver support. - New ORM test base class, and a featureful base for mapped tests - Usage of 'global' for shared setup going away, * imports as well
* r4695 merged to trunk; trunk now becomes 0.5.Mike Bayer2008-05-091-39/+15
| | | | 0.4 development continues at /sqlalchemy/branches/rel_0_4
* - moved property._is_self_referential() to be more generalized; returns True ↵Mike Bayer2008-03-071-9/+7
| | | | | | for any mapper.isa() relationship between parent and child, and indicates that aliasing should be used for any join/correlation across the relation. allows joins/any()/has() to work with inherited mappers referencing the parent etc. - the original _is_self_referential() is now _refers_to_parent_table() and is only used during "direction" calculation to indicate the relation is from a single table to itself
* - adjusted generative.py test for revised error messageMike Bayer2008-03-061-2/+2
| | | | | - mapper with non_primary asserts primary mapper already created - added any()/instance compare test to query
* - fixed bug whereby session.expire() attributes were notMike Bayer2008-03-011-0/+2
| | | | | | | | | | | | | | loading on an polymorphically-mapped instance mapped by a select_table mapper. - added query.with_polymorphic() - specifies a list of classes which descend from the base class, which will be added to the FROM clause of the query. Allows subclasses to be used within filter() criterion as well as eagerly loads the attributes of those subclasses. - deprecated Query methods apply_sum(), apply_max(), apply_min(), apply_avg(). Better methodologies are coming....
* - 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
* - Removed some test bogosityJason Kirtland2008-01-221-11/+10
|
* - testbase is gone, replaced by testenvJason Kirtland2008-01-121-29/+29
| | | | | | - 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
* - Removed @testing.supported. Dialects in development or maintained outsideJason Kirtland2007-12-131-14/+9
| | | | | | | | | | | the tree can now run the full suite of tests out of the box. - Migrated most @supported to @fails_on, @fails_on_everything_but, or (last resort) @unsupported. @fails_on revealed a slew of bogus test skippage, which was corrected. - Added @fails_on_everything_but. Yes, the first usage *was* "fails_on_everything_but('postgres')". How did you guess! - Migrated @supported in dialect/* to the new test-class attribute __only_on__. - Test classes can also have __unsupported_on__ and __excluded_on__.
* Migrated maxdb behavioral assumptions from unsupported to fails_onJason Kirtland2007-11-051-16/+17
|
* Added EXT_CONTINUE and EXT_STOP for MapperExtensions; EXT_PASS is a synonym ↵Jason Kirtland2007-08-011-1/+1
| | | | | | for EXT_CONTINUE. Repointed docs and examples to EXT_CONTINUE
* merging 0.4 branch to trunk. see CHANGES for details. 0.3 moves to ↵Mike Bayer2007-07-271-90/+93
| | | | maintenance branch in branches/rel_0_3.
* - Deprecated DynamicMetaData- use ThreadLocalMetaData or MetaData insteadJason Kirtland2007-07-061-3/+3
| | | | | - Deprecated BoundMetaData- use MetaData instead - Removed DMD and BMD from documentation
* - generative test doesnt apply to mysql, othersMike Bayer2007-04-261-0/+1
| | | | | | | | | - refactoring to unitofwork.py. low-hanging cruft removed, UOWTask structure simplified particuularly with the per-instance sort phase, most methods docstring'ed extensively. this is a merge from the 'uowsimplify' branch. (only slightly simpler, tho) - mapper delete_obj works across multiple mappers to be consistent with the operation of save_obj
* - added generative versions of aggregates, i.e. sum(), avg(), etc.Mike Bayer2007-04-251-0/+4
| | | | | to query. used via query.apply_max(), apply_sum(), etc. #552
* error raised if trying to auto-join on a self referentialMike Bayer2007-03-281-2/+26
|
* MSSQL now passes still more unit tests [ticket:481]Rick Morrison2007-03-151-3/+12
| | | | | | | Fix to null FLOAT fields in mssql-trusted.patch MSSQL: LIMIT with OFFSET now raises an error MSSQL: can now specify Windows authorization MSSQL: ignores seconds on DATE columns (DATE fix, part 1)
* - the full featureset of the SelectResults extension has been mergedMike Bayer2007-03-101-0/+229
into a new set of methods available off of Query. These methods all provide "generative" behavior, whereby the Query is copied and a new one returned with additional criterion added. The new methods include: filter() - applies select criterion to the query filter_by() - applies "by"-style criterion to the query avg() - return the avg() function on the given column join() - join to a property (or across a list of properties) outerjoin() - like join() but uses LEFT OUTER JOIN limit()/offset() - apply LIMIT/OFFSET range-based access which applies limit/offset: session.query(Foo)[3:5] distinct() - apply DISTINCT list() - evaluate the criterion and return results no incompatible changes have been made to Query's API and no methods have been deprecated. Existing methods like select(), select_by(), get(), get_by() all execute the query at once and return results like they always did. join_to()/join_via() are still there although the generative join()/outerjoin() methods are easier to use. - the return value for multiple mappers used with instances() now returns a cartesian product of the requested list of mappers, represented as a list of tuples. this corresponds to the documented behavior. So that instances match up properly, the "uniquing" is disabled when this feature is used. - strings and columns can also be sent to the *args of instances() where those exact result columns will be part of the result tuples. - query() method is added by assignmapper. this helps with navigating to all the new generative methods on Query.