Mike Bayer [Fri, 27 Jun 2008 20:12:11 +0000 (20:12 +0000)]
- Modified SQLite's representation of "microseconds" to
match the output of str(somedatetime), i.e. in that the
microseconds are represented as fractional seconds in
string format. [ticket:1090]
- implemented a __legacy_microseconds__ flag on DateTimeMixin which can
be used per-class or per-type instances to get the old behavior, for
compatibility with existing SQLite databases encoded by a previous
version of SQLAlchemy.
- will implement the reverse legacy behavior in 0.4.
Gaëtan de Menten [Wed, 25 Jun 2008 15:55:49 +0000 (15:55 +0000)]
`session.Query().iterate_instances()` has been renamed to just `instances()`. The old `instances()` method returning a list instead of an iterator no longer
exists. If you were relying on that behavior, you should use `list(your_query.instances())`.
Mike Bayer [Sat, 21 Jun 2008 17:23:14 +0000 (17:23 +0000)]
- implemented [ticket:887], refresh readonly props upon save
- moved up "eager_defaults" active refresh step (this is an option used by just one user pretty much)
to be per-instance instead of per-table
- fixed table defs from previous deferred attributes enhancement
- CompositeColumnLoader equality comparison fixed for a/b == None; I suspect the composite capability in SA
needs a lot more work than this
Mike Bayer [Tue, 17 Jun 2008 20:52:11 +0000 (20:52 +0000)]
- Added is_active flag to Sessions to detect when
a transaction is in progress [ticket:976]. This
flag is always True with a "transactional"
(in 0.5 a non-"autocommit") Session.
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%