Mike Bayer [Mon, 9 Jun 2008 01:24:08 +0000 (01:24 +0000)]
- Query.UpdateDeleteTest.test_delete_fallback fails on mysql due to subquery 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
Mike Bayer [Mon, 2 Jun 2008 03:07:12 +0000 (03:07 +0000)]
- removed query.min()/max()/sum()/avg(). these should be called using 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)
Mike Bayer [Mon, 26 May 2008 23:01:05 +0000 (23:01 +0000)]
added string argument resolution to relation() in conjunction with declarative for: order_by,
primaryjoin, secondaryjoin, secondary, foreign_keys, and remote_side.
Mike Bayer [Sat, 24 May 2008 17:37:58 +0000 (17:37 +0000)]
- removed info about _local_remote_pairs from PropertyLoader.__determine_fks
- added order_by(), group_by(), having() to the list of "no offset()/limit()", [ticket:851]
Mike Bayer [Wed, 21 May 2008 21:40:58 +0000 (21:40 +0000)]
- globally renamed refresh_instance to refresh_state
- removed 'instance' arg from session.get_bind() and friends, this is not a public API
- renamed 'state' arg on same to '_state'
- fixes [ticket:1055]
Jason Kirtland [Wed, 21 May 2008 18:31:52 +0000 (18:31 +0000)]
- Fixed ORM orphaning bug with _raw_append method
- Promoted _reorder to reorder
- Now horking docstrings of overloaded methods from list
- Added a doctest
Jason Kirtland [Wed, 21 May 2008 03:39:06 +0000 (03:39 +0000)]
- Centralized 'x is not mapped' reporting into sa.orm.exc.
- Guards are now present on all public Session methods and passing in an
unmapped hoho anywhere yields helpful exception messages, going to some
effort to provide hints for debugging situations that would otherwise seem
hopeless, such as broken user instrumentation or half-pickles.
Jason Kirtland [Tue, 20 May 2008 21:44:43 +0000 (21:44 +0000)]
- Fleshed out Session.get_bind(), generating a couple todos: [ticket:1053], [ticket:1054], [ticket:1055]
- Trotted out util.pending_deprecation, replacing some 'TODO: deprecate's
- Big session docstring content edit fiesta
- session.py line length and whitespace non-fiesta
Mike Bayer [Mon, 19 May 2008 22:35:32 +0000 (22:35 +0000)]
- zoomark/zoomark_orm seem to work with pool_threadlocal turned off, [ticket:1050] becomes WORKSFORME
- fixed probably errenous unique=True checkin on unitofwork.py
Mike Bayer [Sun, 18 May 2008 15:49:14 +0000 (15:49 +0000)]
- added test for threadlocal not supporting begin_nested()
- removed query.compile(); use explicit query.with_labels().statement instead
- moved statement annotation step upwards from query._compile_context() to outliers from_self()/statement. speeds zoomark.step_6_editing by 16%
Mike Bayer [Tue, 13 May 2008 20:35:41 +0000 (20:35 +0000)]
- renamed query.slice_() to query.slice()
- pulled out DeclarativeMeta.__init__ into its own function, added instrument_declarative()
which will do the "declarative" thing to any class independent of its lineage (for ctheune)
- added "cls" kwarg to declarative_base() allowing user-defined base class for declarative base [ticket:1042]
Mike Bayer [Tue, 13 May 2008 19:55:49 +0000 (19:55 +0000)]
- LIMIT/OFFSET of zero is detected within compiler and is counted
- Query.__getitem__ now returns list/scalar in all cases, not generative (#1035)
- added Query.slice_() which provides the simple "limit/offset from a positive range" operation,
we can rename this to range_()/section()/_something_private_because_users_shouldnt_do_this() as needed
Mike Bayer [Mon, 12 May 2008 16:15:28 +0000 (16:15 +0000)]
- clause adaption hits _raw_columns of a select() (though no ORM tests need this feature currently)
- broke up adapter chaining in eagerload, erroneous "wrapping" in row_decorator. column_property() subqueries are now affected only by the ORMAdapter for that mapper. fixes [ticket:1037], and may possibly impact some of [ticket:949]