summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/persistence.py
Commit message (Collapse)AuthorAgeFilesLines
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - fix bug due to regression from #2793, make sure we only go to loadMike Bayer2013-10-111-2/+2
| | | | | scalar attributes here and not relationships, else we get an error if there's no actual scalars to load
* - modify what we did in [ticket:2793] so that we can also set theMike Bayer2013-09-061-4/+5
| | | | | version id programmatically outside of the generator. using this system, we can also leave the version id alone.
* - The ``version_id_generator`` parameter of ``Mapper`` can now be specifiedMike Bayer2013-08-251-40/+85
| | | | | | | | | | | | | | | | | | | | | 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]
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-141-1/+1
| | | | | | | | | - rework the event system so that event modules load after their targets, dependencies are reversed - create an improved strategy lookup system for the ORM - rework the ORM to have very few import cycles - move out "importlater" to just util.dependency - other tricks to cross-populate modules in as clear a way as possible
* - create a new system where we can decorate an event methodMike Bayer2013-07-081-4/+6
| | | | | | | | | | | | | | | | with @_legacy_signature, will inspect incoming listener functions to see if they match an older signature, will wrap into a newer sig - add an event listen argument named=True, will send all args as kw args so that event listeners can be written with **kw, any combination of names - add a doc system to events that writes out the various calling styles for a given event, produces deprecation messages automatically. a little concerned that it's a bit verbose but will look at it up on RTD for awhile to get a feel. - change the calling signature for bulk update/delete events - we have the BulkUD object right there, and there's at least six or seven things people might want to see, so just send the whole BulkUD in [ticket:2775]
* A warning is emitted when trying to flush an object of an inheritedMike Bayer2013-06-301-0/+3
| | | | | mapped class where the polymorphic discriminator has been assigned to a value that is invalid for the class. [ticket:2750]
* Merge branch 'rel_0_9'Mike Bayer2013-05-291-11/+11
|\ | | | | | | | | | | | | Conflicts: lib/sqlalchemy/dialects/postgresql/hstore.py lib/sqlalchemy/util/__init__.py lib/sqlalchemy/util/compat.py
| * a pass where we try to squash down as many list()/keys() combinationsMike Bayer2013-05-261-1/+1
| | | | | | | | as possible
| * - the raw 2to3 runMike Bayer2013-04-271-11/+11
| | | | | | | | - went through examples/ and cleaned out excess list() calls
* | - move an import stuck in the middle here...Mike Bayer2013-05-281-1/+1
|/
* lintingMike Bayer2013-03-091-1/+1
|
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* just a pep8 pass of lib/sqlalchemy/orm/Diana Clarke2012-11-191-3/+23
|
* added test of synchronize_session='fetch' on rows which are not already in ↵Scott Torborg2012-11-101-0/+1
| | | | the session, and patch to fix failure
* Added test and fix for version_id_col bug.Daniel Miller2012-09-121-1/+1
|
* - [feature] The Query.update() method is nowMike Bayer2012-08-201-4/+7
| | | | | | | | | | | | | | | | | more lenient as to the table being updated. Plain Table objects are better supported now, and additional a joined-inheritance subclass may be used with update(); the subclass table will be the target of the update, and if the parent table is referenced in the WHERE clause, the compiler will call upon UPDATE..FROM syntax as allowed by the dialect to satisfy the WHERE clause. Target columns must still be in the target table i.e. does not support MySQL's multi-table update feature (even though this is in Core). PG's DELETE..USING is also not available in Core yet.
* don't need this is_really_none() thing anymoreMike Bayer2012-08-081-11/+11
|
* - with InstanceState more public, underscore all its methodsMike Bayer2012-07-181-107/+107
| | | | | that change object state as these aren't intended for public use.
* - move all of orm to use absolute importsMike Bayer2012-06-231-11/+9
| | | | | | | | - break out key mechanics of loading objects into new "orm.loading" module, removing implementation details from both mapper.py and query.py. is analogous to persistence.py - some other cleanup and old cruft removal
* dont call connection()/get_bind() all that here if we don't have toMike Bayer2012-06-131-2/+4
|
* - refactor query.update() and query.delete() to use a pureMike Bayer2012-04-291-14/+247
| | | | | template method pattern using new class hierarchy BulkUD in sqlalchemy.orm.persistence
* - add __table_cls__ option to declarative, not publicized yet, is for the momentMike Bayer2012-03-121-12/+8
| | | | | | | | | | | | | | for the benefit of the test.lib.schema package. - use test.lib.schema.Table for the table within test.lib.fixtures.DeclarativeMappedTest - [bug] Removed the check for number of rows affected when doing a multi-delete against mapped objects. If an ON DELETE CASCADE exists between two rows, we can't get an accurate rowcount from the DBAPI; this particular count is not supported on most DBAPIs in any case, MySQLdb is the notable case where it is. [ticket:2403]
* fix an inadvertent abuse of variable scopeMike Bayer2012-01-311-1/+2
|
* break out _save_obj(), _delete_obj(), _post_update() into a new moduleMike Bayer2012-01-301-0/+780
persistence.py - Mapper loses awareness of how to emit INSERT/UPDATE/DELETE, persistence.py is only used by unitofwork.py. Then break each method out into a top level with almost no logic, calling into _organize_states_for_XYZ(), _collect_XYZ_commands(), _emit_XYZ_statements().