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.
Mike Bayer [Fri, 14 Jul 2006 20:06:09 +0000 (20:06 +0000)]
overhaul to schema, addition of ForeignKeyConstraint/
PrimaryKeyConstraint objects (also UniqueConstraint not
completed yet). table creation and reflection modified
to be more oriented towards these new table-level objects.
reflection for sqlite/postgres/mysql supports composite
foreign keys; oracle/mssql/firebird not converted yet.
Jonathan LaCour [Fri, 14 Jul 2006 14:54:53 +0000 (14:54 +0000)]
ActiveMapper now supports autoloading of column definitions if you supply
a __autoload__ = True attribute in your inner mapping class. It does not
currently support autoloading relationships.
Mike Bayer [Tue, 11 Jul 2006 00:36:32 +0000 (00:36 +0000)]
sqlite detects version and disables CAST if version < 3.2.3
fixes to unittests, mapper extension to work better with setting/unsetting extensions
objectstore objects get 'session' attribute
Mike Bayer [Mon, 10 Jul 2006 21:53:49 +0000 (21:53 +0000)]
activemapper will use threadlocal mod's objectstore if its installed
both objectstores no longer subclass SessionContext, get at it via .context attribute instead
Mike Bayer [Sun, 9 Jul 2006 19:48:02 +0000 (19:48 +0000)]
some refactorings to activemapper, made relationship() class have some polymorphic behavior for initializing its real relation, added support + unittest for self-referential relationship
Mike Bayer [Sun, 9 Jul 2006 17:58:01 +0000 (17:58 +0000)]
added workaround for funny pragma behavior on windows pysqlite
singletonthreadpool has a dispose() method, used by proxy_engine test
to better clean up after itself on windows
Mike Bayer [Sat, 8 Jul 2006 16:07:16 +0000 (16:07 +0000)]
took out that whole compilation dependency thing. just need to loop through mapper_registry and compile whatever is not compiled. the "non-reentrant" compile() method, which is a product of the whole compilation dependency tangent, makes this pretty easy. So it was a pretty roundabout way to go for ultimately a pretty small change to compilation.
Mike Bayer [Mon, 3 Jul 2006 15:55:20 +0000 (15:55 +0000)]
ordering of UPDATE and DELETE statements within groups is now
in order of primary key values, for more deterministic ordering
after_insert/delete/update mapper extensions now called per object,
not per-object-per-table
fixed import in firebird.py
Mike Bayer [Sat, 1 Jul 2006 19:26:30 +0000 (19:26 +0000)]
got MS-SQL support largely working, including reflection, basic types, fair amount of ORM stuff, etc.
'rowcount' label is reseved in MS-SQL and had to change in sql.py count() as well as orm.query
Mike Bayer [Fri, 30 Jun 2006 03:56:49 +0000 (03:56 +0000)]
fixes to attributes/related so that get_history with passive=True returns no
AttributeHistory object if an untriggered callable was found (not sure how this used to work
OK....)
Jonathan LaCour [Fri, 30 Jun 2006 01:19:52 +0000 (01:19 +0000)]
Put back in the foreign-key checking code in process_relationships for
ActiveMapper. It looks like it is required by at least one person, so for
now the code will stay in!
Jonathan LaCour [Thu, 29 Jun 2006 23:29:37 +0000 (23:29 +0000)]
There were two significant changes in this commit:
* Added implicit primary keys to ActiveMapper. Now, if you do not speicfy a
primary key on your objects when declaring them, an Integer primary key
called `id` will automatically be added to your objects for you.
* Commented out a large chunk of the process_relationships function that
should no longer be necessary thanks to some of the deferred mapper
compilation that was added in SQLAlchemy 0.2.3. I left it in the code, but
commented it out just in case this change causes a problem in someone's
else's code and I can put it back in if needed.
Mike Bayer [Tue, 27 Jun 2006 22:24:39 +0000 (22:24 +0000)]
new MySQL types: MSEnum, MSTinyText, MSMediumText, MSLongText, etc.
more support for MS-specific length/precision params in numeric types
patch courtesy Mike Bernson