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
Mike Bayer [Thu, 22 Jun 2006 20:03:09 +0000 (20:03 +0000)]
identified another TLTransaction scenario, and adjusted TLConnection/TLSession to fix this as well (reverted previous change, and overriding in_transaction() instead)
Mike Bayer [Thu, 22 Jun 2006 19:46:44 +0000 (19:46 +0000)]
TLConnection insures that it is used to create a transaction via the session when begin() is called, so that it has proper transactional context, + unittests
Mike Bayer [Mon, 19 Jun 2006 20:41:42 +0000 (20:41 +0000)]
when Query does the "nested select" thing, it copies the ORDER BY to be placed on the "outer" select, so that eager loaders modify only the outer one and not the inner one
Robert Leftwich [Sun, 18 Jun 2006 22:16:36 +0000 (22:16 +0000)]
Added some additional data to exception raised in PropertyLoader,_get_direction when cannot determine the direction to specify exactly which relation failed.
Mike Bayer [Sun, 18 Jun 2006 00:56:25 +0000 (00:56 +0000)]
lazy load and deferred load operations require the parent object
to be in a Session to do the operation; whereas before the operation
would just return a blank list or None, it now raises an exception.
Session.update() is slightly more lenient if the session to which
the given object was formerly attached to was garbage collected;
otherwise still requires you explicitly remove the instance from
the previous Session.
Mike Bayer [Sat, 17 Jun 2006 00:53:33 +0000 (00:53 +0000)]
cast converted into its own ClauseElement so that it can have an explicit compilation
function in ANSICompiler
MySQLCompiler then skips most CAST calls since it only seems to support the standard syntax for Date
types; other types now a TODO for MySQL
then, polymorphic_union() function now CASTs null()s to the type corresponding to the columns in the UNION,
since postgres doesnt like mixing NULL with integer types
(long road for that .....)
Mike Bayer [Fri, 16 Jun 2006 19:21:57 +0000 (19:21 +0000)]
more intelligent "removal" of list items when a list attribute is replaced, doesnt actually "remove" the items from teh replaced list just marks them as "removed" from the parent object for history purposes
Mike Bayer [Fri, 16 Jun 2006 19:02:10 +0000 (19:02 +0000)]
removed historyarray test
ForeignKey is more intelligent about locating the parent table it represents, in the case that
its attached to a CompoundSelect column which has multiple "originals", some of which might not be schema.Columns
Mike Bayer [Fri, 16 Jun 2006 03:19:53 +0000 (03:19 +0000)]
fixed bug where if a many-to-many table mapped as "secondary" had other cols in it, delete operations would try to match up on those columns. also fixed bug in new attributes if you set a list based attribute to a blank list, properly fires the 'delete' event for the elements of the previous list
Mike Bayer [Thu, 15 Jun 2006 15:27:39 +0000 (15:27 +0000)]
if an item attached to a parent is found to be already in the session, then the "save-update" cascade operation doesnt take place. currently this prevents unncessessary cascading due to backref events, which was a massive speed hit.
Mike Bayer [Thu, 8 Jun 2006 16:58:14 +0000 (16:58 +0000)]
late compilation of mappers. now you can create mappers in any order, and they will compile their internal state when first used in a query or flush operation (or their props or 'c'/'columns' attributes are used). includes various cleanups and fixes in support of the change, including some unit test changes, additional unit tests.
Jonathan LaCour [Tue, 6 Jun 2006 17:58:41 +0000 (17:58 +0000)]
Further improved the process_relationships function to handle the ordering of
class definitions better. The function was only looking at relationships, not
foreign keys, and was making some improper assumptions. The unit tests all
still pass, and now some of my own code actually works, regardless of the order
that I define the classes in.' 'lib/sqlalchemy/ext/activemapper.py
Mike Bayer [Mon, 5 Jun 2006 22:45:10 +0000 (22:45 +0000)]
"foreignkey" property of PropertyLoader is a sets.Set. removed "foreigntable".
simplified/fixed foreign key location in _find_dependent(), fixes [ticket:151]