Mike Bayer [Mon, 21 Aug 2006 00:37:34 +0000 (00:37 +0000)]
- postgres reflection moved to use pg_schema tables, can be overridden
with use_information_schema=True argument to create_engine
[ticket:60], [ticket:71]
- added natural_case argument to Table, Column, semi-experimental
flag for use with table reflection to help with quoting rules
[ticket:155]
Mike Bayer [Fri, 18 Aug 2006 20:12:39 +0000 (20:12 +0000)]
[ticket:280] statement execution supports using the same BindParam
object more than once in an expression; simplified handling of positional
parameters. nice job by Bill Noon figuring out the basic idea.
Mike Bayer [Fri, 18 Aug 2006 17:21:01 +0000 (17:21 +0000)]
- unit-of-work does a better check for "orphaned" objects that are
part of a "delete-orphan" cascade, for certain conditions where the
parent isnt available to cascade from.
- it is now invalid to declare a self-referential relationship with
"delete-orphan" (as the abovementioned check would make them impossible
to save)
- improved the check for objects being part of a session when the
unit of work seeks to flush() them as part of a relationship..
Mike Bayer [Thu, 17 Aug 2006 18:04:13 +0000 (18:04 +0000)]
commit should be outside of the try/except; else when commit fails, rollback gets called which is technically invalid (although SA transaction probably lets it slide...this should also possibly be made more strict)
Mike Bayer [Thu, 17 Aug 2006 00:12:59 +0000 (00:12 +0000)]
if a contextual session is established via MapperExtension.get_session
(as it is using the sessioncontext plugin, etc), a lazy load operation
will use that session by default if the parent object is not
persistent with a session already.
Mike Bayer [Tue, 15 Aug 2006 02:02:47 +0000 (02:02 +0000)]
- eesh ! the tutorial doctest was broken for quite some time.
- add_property() method on mapper does a "compile all mappers"
step in case the given property references a non-compiled mapper
(as it did in the case of the tutorial !)
Mike Bayer [Sat, 12 Aug 2006 22:58:49 +0000 (22:58 +0000)]
modifcation to unitofwork to not maintain ordering within the
"new" list or within the UOWTask "objects" list; instead, new objects
are tagged with an ordering identifier as they are registered as new
with the session, and the INSERT statements are then sorted within the
mapper save_obj. the INSERT ordering has basically been pushed allthe way
to the end of the flush cycle. that way the various sorts and
organizations occuring within UOWTask (particularly the circular task
sort) dont have to worry about maintaining order (which they werent anyway)
Mike Bayer [Sat, 12 Aug 2006 17:53:04 +0000 (17:53 +0000)]
turned off default case-folding rules as they wreak havoc with the current unittests,
temporary isintance() checks in ASNIIdentifierPreparer which will be replaced with visit_
methodology
Mike Bayer [Sat, 12 Aug 2006 17:28:15 +0000 (17:28 +0000)]
quoting facilities set up so that database-specific quoting can be
turned on for individual table, schema, and column identifiers when
used in all queries/creates/drops. Enabled via "quote=True" in
Table or Column, as well as "quote_schema=True" in Table. Thanks to
Aaron Spike for his excellent efforts. [ticket:155]
Mike Bayer [Fri, 11 Aug 2006 19:16:27 +0000 (19:16 +0000)]
inheritance check uses issubclass() instead of direct __mro__ check
to make sure class A inherits from B, allowing mapper inheritance to more
flexibly correspond to class inheritance [ticket:271]
Mike Bayer [Sat, 5 Aug 2006 15:32:00 +0000 (15:32 +0000)]
improvement over previous changeset:
SingletonThreadPool has a size and does a cleanup pass, so that
only a given number of thread-local connections stay around (needed
for sqlite applications that dispose of threads en masse)
Mike Bayer [Fri, 4 Aug 2006 06:21:58 +0000 (06:21 +0000)]
adjustments to pool stemming from changes made for [ticket:224].
overflow counter should only be decremented if the connection actually
succeeded. added a test script to attempt testing this.
Mike Bayer [Thu, 3 Aug 2006 00:28:57 +0000 (00:28 +0000)]
- better check for ambiguous join conditions in sql.Join; propigates to a
better error message in PropertyLoader (i.e. relation()/backref()) for when
the join condition can't be reasonably determined.
- sqlite creates ForeignKeyConstraint objects properly upon table
reflection.
Mike Bayer [Thu, 27 Jul 2006 04:33:32 +0000 (04:33 +0000)]
custom primary/secondary join conditions in a relation *will* be propigated
to backrefs by default. specifying a backref() will override this behavior.
Mike Bayer [Sat, 22 Jul 2006 06:21:58 +0000 (06:21 +0000)]
fixed reflection of foreign keys to autoload the referenced table
if it was not loaded already, affected postgres, mysql, oracle.
fixes the latest in [ticket:105]
Mike Bayer [Wed, 19 Jul 2006 20:25:09 +0000 (20:25 +0000)]
mapper compilation work ongoing, someday it'll work....moved
around the initialization of MapperProperty objects to be after
all mappers are created to better handle circular compilations.
do_init() method is called on all properties now which are more
aware of their "inherited" status if so.
eager loads explicitly disallowed on self-referential relationships, or
relationships to an inheriting mapper (which is also self-referential)
Mike Bayer [Wed, 19 Jul 2006 16:10:15 +0000 (16:10 +0000)]
fix to typing in clause construction which specifically helps
type issues with polymorphic_union (CAST/ColumnClause propigates
its type to proxy columns)
Mike Bayer [Tue, 18 Jul 2006 17:09:08 +0000 (17:09 +0000)]
added "synonym()" function, applied to properties to have a
propname the same as another, for the purposes of overriding props
and allowing the original propname to be accessible in select_by().
Mike Bayer [Tue, 18 Jul 2006 15:14:55 +0000 (15:14 +0000)]
overhaul to MapperExtension so they arent chained via "next"; this breaks all over the place since extensions get copied between mappers etc. now theyre assembled into a list, of which a single extension can belong to many different lists.