summaryrefslogtreecommitdiff
path: root/test/orm/test_versioning.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix many typos throughout the codebasepr/85Alex Gaynor2014-04-261-1/+1
| | | | Found using: https://github.com/intgr/topy
* - fix the uuid routine here to not run out of uuidsMike Bayer2014-03-241-20/+2
|
* - rename __multiple__ to __backend__, and apply __backend__ to a large ↵Mike Bayer2014-03-241-0/+7
| | | | | | number of tests. - move out logging tests from test_execute to test_logging
* - modify what we did in [ticket:2793] so that we can also set theMike Bayer2013-09-061-0/+86
| | | | | version id programmatically outside of the generator. using this system, we can also leave the version id alone.
* - ensure rowcount is returned for an UPDATE with no implicit returningMike Bayer2013-08-251-1/+1
| | | | | - modernize test for that - use py3k compatible next() in test_returning/test_versioning
* - The ``version_id_generator`` parameter of ``Mapper`` can now be specifiedMike Bayer2013-08-251-4/+191
| | | | | | | | | | | | | | | | | | | | | to rely upon server generated version identifiers, using triggers or other database-provided versioning features, by passing the value ``False``. The ORM will use RETURNING when available to immediately load the new version identifier, else it will emit a second SELECT. [ticket:2793] - The ``eager_defaults`` flag of :class:`.Mapper` will now allow the newly generated default values to be fetched using an inline RETURNING clause, rather than a second SELECT statement, for backends that support RETURNING. - Added a new variant to :meth:`.ValuesBase.returning` called :meth:`.ValuesBase.return_defaults`; this allows arbitrary columns to be added to the RETURNING clause of the statement without interfering with the compilers usual "implicit returning" feature, which is used to efficiently fetch newly generated primary key values. For supporting backends, a dictionary of all fetched values is present at :attr:`.ResultProxy.returned_defaults`. - add a glossary entry for RETURNING - add documentation for version id generation, [ticket:867]
* getting everything to pass againMike Bayer2012-09-271-1/+2
|
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-5/+5
| | | | | | | 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.
* - [bug] Fixed bug where incorrect type informationMike Bayer2012-09-161-2/+8
| | | | | | would be passed when the ORM would bind the "version" column, when using the "version" feature. Tests courtesy Daniel Miller. [ticket:2539]
* Added test and fix for version_id_col bug.Daniel Miller2012-09-121-1/+36
|
* -whitespace bonanza, contdMike Bayer2012-07-281-14/+14
|
* wrap another StaleDataError detection in supports_sane_row_countPhilip Jenvey2011-05-111-6/+8
|
* update warnings per zxjdbcPhilip Jenvey2011-04-231-2/+11
|
* - move all the comments that got shoved below the fixture grabs back upMike Bayer2011-03-271-5/+9
|
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-12/+13
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* - move all the setup_classes(cls) and setup_mappers(cls) to use aMike Bayer2011-03-271-6/+6
| | | | | local cls.Basic, cls.Comparable base class so that there is no ambiguity or hash identity behaviors getting in the way of class registration.
* - remove @testing.resolve_artifact_names, replace with direct attributeMike Bayer2011-03-261-22/+62
| | | | | | | access to the cls/self.tables/classes registries - express orm/_base.py ORMTest in terms of engine/_base.py TablesTest, factor out common steps into TablesTest, remove AltEngineTest as a separate class. will further consolidate these base classes
* - fix oracle testsMike Bayer2011-01-251-1/+1
| | | | - fix some obnoxious type adaption issues resulting from the "adapt must copy" change
* - Session.merge() will check the version id of the incomingMike Bayer2011-01-181-28/+86
| | | | | | | state against that of the database, assuming the mapping uses version ids and incoming state has a version_id assigned, and raise StaleDataError if they don't match. [ticket:2027]
* - whitespace removal bonanzaMike Bayer2011-01-021-25/+24
|
* - merge rfc0b9df5d9e0 from 0.6 branchMike Bayer2010-12-281-3/+91
|
* - move sqlalchemy.test to test.libMike Bayer2010-11-151-3/+3
|
* - The name ConcurrentModificationError has beenMike Bayer2010-08-011-12/+34
| | | | | | | | | | changed to StaleDataError, and descriptive error messages have been revised to reflect exactly what the issue is. Both names will remain available for the forseeable future for schemes that may be specifying ConcurrentModificationError in an "except:" clause.
* - The value of version_id_col can be changedMike Bayer2010-07-241-3/+41
| | | | | | | | | | | | | manually, and this will result in an UPDATE of the row. Versioned UPDATEs and DELETEs now use the "committed" value of the version_id_col in the WHERE clause and not the pending changed value. The version generator is also bypassed if manual changes are present on the attribute. [ticket:1857] - ensure before_update/after_update called on parent for collection change
* - apparently [ticket:1761] was covered in tests already.Mike Bayer2010-04-041-1/+1
| | | | | | | | | - Usage of version_id_col on a backend that supports cursor.rowcount for execute() but not executemany() now works when a delete is issued (already worked for saves, since those don't use executemany()). For a backend that doesn't support cursor.rowcount at all, a warning is emitted the same as with saves. [ticket:1761]
* - Session.refresh() now does an equivalent expire()Mike Bayer2010-03-291-10/+32
| | | | | | | | | | | | | | | | on the given instance first, so that the "refresh-expire" cascade is propagated. Previously, refresh() was not affected in any way by the presence of "refresh-expire" cascade. This is a change in behavior versus that of 0.6beta2, where the "lockmode" flag passed to refresh() would cause a version check to occur. Since the instance is first expired, refresh() always upgrades the object to the most recent version. - The 'refresh-expire' cascade, when reaching a pending object, will expunge the object if the cascade also includes "delete-orphan", or will simply detach it otherwise. [ticket:1754]
* - added "lockmode" kw argument to Session.refresh(), willMike Bayer2010-03-191-1/+14
| | | | | | pass through the string value to Query the same as in with_lockmode(), will also do version check for a version_id_col-enabled mapping.
* - The official name for the relation() function is nowMike Bayer2010-03-171-3/+3
| | | | | | relationship(), to eliminate confusion over the relational algebra term. relation() however will remain available in equal capacity for the foreseeable future. [ticket:1740]
* - Fixed bug which caused "row switch" logic, that is anMike Bayer2010-03-161-0/+307
INSERT and DELETE replaced by an UPDATE, to fail when version_id_col was in use. [ticket:1692] - Added "version_id_generator" argument to Mapper, this is a callable that, given the current value of the "version_id_col", returns the next version number. Can be used for alternate versioning schemes such as uuid, timestamps. [ticket:1692]