| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
See README.unittests for information on how to run
the tests. [ticket:970]
|
| |
|
|
|
|
|
|
|
|
| |
will clear any pending backref additions as well, so that
the next access correctly returns only what was present
in the database. Presents some degree of a workaround for
[ticket:1315], although we are considering removing the
flush([objects]) feature altogether.
|
|
|
|
|
| |
deferred attributes. This prevents them from being needlessly
loaded when the instance is refreshed.
|
|
|
|
|
|
| |
Session methods have been deprecated, replaced by
"expunge_all()" and "add()". "expunge_all()" has also
been added to ScopedSession.
|
|
|
|
|
| |
This should assist with helping to document the reasons for testing failures.
Currently unspecified failures are defaulted to 'FIXME: unknown'.
|
| |
|
|
|
|
| |
rather than an empty list. nice speed boost and memory reduction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the list of attributes does not include any column-based
attributes.
- query() raises an informative error message if no columns
or mappers are specified.
- lazy loaders now trigger autoflush before proceeding. This
allows expire() of a collection or scalar relation to
function properly in the context of autoflush.
- whitespace fix to new Table prefixes option
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in DELETE; not sure how to do this exact operation in MySQL
- added query_cls keyword argument to sessionmaker(); allows user-defined Query subclasses to be generated by query().
- added @attributes.on_reconstitute decorator, MapperExtension.on_reconstitute, both receieve 'on_load' attribute event allowing
non-__init__ dependent instance initialization routines.
- push memusage to the top to avoid pointless heisenbugs
- renamed '_foostate'/'_fooclass_manager' to '_sa_instance_state'/'_sa_class_manager'
- removed legacy instance ORM state accessors
- query._get() will use _remove_newly_deleted instead of expunge() on ObjectDeleted, so that transaction rollback
restores the previous state
- removed MapperExtension.get(); replaced by a user-defined Query subclass
- removed needless **kwargs from query.get()
- removed Session.get(cls, id); this is redundant against Session.query(cls).get(id)
- removed Query.load() and Session.load(); the use case for this method has never been clear, and the same functionality is available in more explicit ways
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- @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
|
|
|
|
| |
0.4 development continues at /sqlalchemy/branches/rel_0_4
|
|
|
|
|
| |
error will not be raised when the "refresh" action
is triggered and returns no result
|
|
|
|
| |
unittest method
|
|
|
|
|
|
| |
- session.refresh() and session.expire() raise an error when
called on instances which are not persistent within the session
- session._validate_persistent() properly raises an error for false check
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
against expired_attributes
and unset the expired flag for those attributes. This is partially so that attributes are not
needlessly marked as expired after a two-phase inheritance load.
- fixed bug which was introduced in 0.4.3, whereby loading an
already-persistent instance mapped with joined table inheritance
would trigger a useless "secondary" load from its joined
table, when using the default "select" polymorphic_fetch.
This was due to attributes being marked as expired
during its first load and not getting unmarked from the
previous "secondary" load. Attributes are now unexpired
based on presence in __dict__ after any load or commit
operation succeeds.
|
|
|
|
|
|
|
|
|
|
| |
for all persistent instances. This is handy in conjunction
with .....
- instances which have been partially or fully expired
will have their expired attributes populated during a regular
Query operation which affects those objects, preventing
a needless second SQL statement for each instance.
|
| |
|
|
|
|
|
|
|
| |
be loaded during a flush() call if needed; in particular,
this allows constructing relations() where a foreign key
column references a server-side-generated, non-primary-key
column. [ticket:954]
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
| |
- proper error message is raised when trying to
access expired instance attributes with no session
present
|
|
|
|
| |
functionality in mapper._instance(), as its not completed, doesn't properly handle mutable scalar attributes, and has poor test coverage
|
| |
|
|
|
|
|
|
|
|
| |
serializable class instances, added pickling tests
- cleaned up "deferred" polymorphic system so that the
mapper handles it entirely
- columns which are missing from a Query's select statement
now get automatically deferred during load.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remains slightly problematic
- cleanup of mapper._instance, query.instances(). mapper identifies objects which are part of the
current load using a app-unique id on the query context.
- attributes refactor; attributes now mostly use copy-on-modify instead of copy-on-load behavior,
simplified get_history(), added a new set of tests
- fixes to OrderedSet such that difference(), intersection() and others can accept an iterator
- OrderedIdentitySet passes in OrderedSet to the IdentitySet superclass for usage in difference/intersection/etc. operations so that these methods actually work with ordering behavior.
- query.order_by() takes into account aliased joins, i.e. query.join('orders', aliased=True).order_by(Order.id)
- cleanup etc.
|
|
|
|
| |
blow away changes made on attributes before the load takes place
|
|
"attribute_names", a list of individual attribute keynames to be refreshed
or expired, allowing partial reloads of attributes on an already-loaded
instance.
- finally simplified the behavior of deferred attributes, deferred polymorphic
load, session.refresh, session.expire, mapper._postfetch to all use a single
codepath through query._get(), which now supports a list of individual attribute names
to be refreshed. the *one* exception still remaining is mapper._get_poly_select_loader(),
which may stay that way since its inline with an already processing load operation.
otherwise, query._get() is the single place that all "load this instance's row" operation
proceeds.
- cleanup all over the place
|