summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/base.py
Commit message (Collapse)AuthorAgeFilesLines
* - Fixed a critical regression caused by :ticket:`3061` where theMike Bayer2015-04-171-0/+2
| | | | | | | | | | | NEVER_SET symbol could easily leak into a lazyload query, subsequent to the flush of a pending object. This would occur typically for a many-to-one relationship that does not use a simple "get" strategy. The good news is that the fix improves efficiency vs. 0.9, because we can now skip the SELECT statement entirely when we detect NEVER_SET symbols present in the parameters; prior to :ticket:`3061`, we couldn't discern if the None here were set or not. fixes #3368
* - Added a new extension suite :mod:`sqlalchemy.ext.baked`. ThisMike Bayer2015-03-111-2/+1
| | | | | | | | simple but unusual system allows for a dramatic savings in Python overhead for the construction and processing of orm :class:`.Query` objects, from query construction up through rendering of a string SQL statement. fixes #3054
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* - random performance whacking vs. 0.9, in particular we have to watchMike Bayer2015-03-081-1/+1
| | | | for the slots-based __getattr__ thing getting hit
* - squash-merge the final row_proc integration branch. this isMike Bayer2015-03-011-0/+4
| | | | | | | | | | | | | | | a much more modest outcome than what we started with. The work of create_row_processor() for ColumnProperty objects is essentially done at query setup time combined with some lookups in _instance_processor(). - to allow this change for deferred columns, deferred columns no longer search for themselves in the result. If they've been set up as deferred without any explicit directive to undefer them, then this is what was asked for. if we don't do this, then we're stuck with this performance penalty for all deferred columns which in the vast majority of typical use cases (e.g. loading large, legacy tables or tables with many/large very seldom used values) won't be present in the result and won't be accessed at all.
* - doc fixesMike Bayer2015-01-061-4/+9
|
* - add MemoizedSlots, a generalized solution to using __getattr__Mike Bayer2015-01-051-1/+6
| | | | | for memoization on a class that uses slots. - apply many more __slots__. mem use for nova now at 46% savings
* - start trying to move things into __slots__. This seems to reduce theslotsMike Bayer2015-01-041-0/+3
| | | | | size of the many per-column objects we're hitting, but somehow the overall memory is hardly being reduced at all in initial testing
* - The :meth:`.InspectionAttr.info` collection is now moved down toMike Bayer2014-08-131-0/+26
| | | | | | | | :class:`.InspectionAttr`, where in addition to being available on all :class:`.MapperProperty` objects, it is also now available on hybrid properties, association proxies, when accessed via :attr:`.Mapper.all_orm_descriptors`. fixes #2971
* - rename _InspectionAttr to InspectionAttrMike Bayer2014-08-131-4/+4
|
* flake8 cleanupMike Bayer2014-08-131-21/+25
|
* - apply pep8 formatting to sqlalchemy/sql, sqlalchemy/util, sqlalchemy/dialects,Brian Jarrett2014-07-201-80/+113
| | | | sqlalchemy/orm, sqlalchemy/event, sqlalchemy/testing
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - Related to :ticket:`3060`, an adjustment has been made to the unitMike Bayer2014-05-301-1/+0
| | | | | | | | | | of work such that loading for related many-to-one objects is slightly more aggressive, in the case of a graph of self-referential objects that are to be deleted; the load of related objects is to help determine the correct order for deletion if passive_deletes is not set. - revert the changes to test_delete_unloaded_m2o, these deletes do in fact need to occur in the order of the two child objects first.
* - Adjustment to attribute mechanics concerning when a value isMike Bayer2014-05-291-1/+2
| | | | | | | | | | | | | | implicitly initialized to None via first access; this action, which has always resulted in a population of the attribute, now emits an attribute event just like any other attribute set operation and generates the same kind of history as one. Additionally, many mapper internal operations will no longer implicitly generate these "None" values when various never-set attributes are checked. These are subtle behavioral fixes to attribute mechanics which provide a better solution to the problem of :ticket:`3060`, which also involves recognition of attributes explicitly set to ``None`` vs. attributes that were never set. fixes #3061
* - Fixed ORM bug where the :func:`.class_mapper` function would maskMike Bayer2014-05-101-2/+3
| | | | | | | AttributeErrors or KeyErrors that should raise during mapper configuration due to user errors. The catch for attribute/keyerror has been made more specific to not include the configuration step. fixes #3047
* - Added a new directive used within the scope of an attribute "set" operationMike Bayer2014-01-311-0/+4
| | | | | | | | to disable autoflush, in the case that the attribute needs to lazy-load the "old" value, as in when replacing one-to-one values or some kinds of many-to-one. A flush at this point otherwise occurs at the point that the attribute is None and can cause NULL violations. [ticket:2921]
* Fix TypeError for class_mapper called w/ iterablepr/58Kyle Stark2014-01-131-1/+1
| | | When the class_ passed is not a mapped class but is actually an iterable, the string formatting operation fails with a TypeError, and the expected ArgumentError is not raised. Calling code which is using reflection and expects this error will fail (e.g. the sadisplay module).
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - fix some docstring stuffMike Bayer2014-01-051-5/+25
|
* Fix references to exceptionsVraj Mohan2013-11-141-2/+2
|
* - add copyright to source files missing itMike Bayer2013-10-261-0/+1
|
* - merge ticket_1418 branch, [ticket:1418]Mike Bayer2013-10-061-0/+13
| | | | | | | | | | | | | - The system of loader options has been entirely rearchitected to build upon a much more comprehensive base, the :class:`.Load` object. This base allows any common loader option like :func:`.joinedload`, :func:`.defer`, etc. to be used in a "chained" style for the purpose of specifying options down a path, such as ``joinedload("foo").subqueryload("bar")``. The new system supersedes the usage of dot-separated path names, multiple attributes within options, and the usage of ``_all()`` options. - Added a new load option :func:`.orm.load_only`. This allows a series of column names to be specified as loading "only" those attributes, deferring the rest.
* - apply an import refactoring to the ORM as wellMike Bayer2013-08-141-0/+419
- 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