Mike Bayer [Fri, 31 Mar 2006 23:43:20 +0000 (23:43 +0000)]
added unit test for the old commit that was in [changeset:1186]. modified its behavior a bit to not delete private relationships unless they were already marked as deleted at the attribute manipulation level. got "switching" behavior from one private relationship to another to work, added a unit test for that.
Mike Bayer [Fri, 31 Mar 2006 02:25:59 +0000 (02:25 +0000)]
Jonas Borgström's fantastic SelectRsults patch that adds dynamic list argument support to the mapper.select() methd. associated unit test tweaks and mapper integration.
Mike Bayer [Mon, 27 Mar 2006 02:02:06 +0000 (02:02 +0000)]
backrefs on cyclical relationships were breaking for the "root" node which had None for a parent, due to addition in [changeset:1186] which added a "deletion" traversal for many-to-one relationships. added unittest.
Mike Bayer [Sun, 26 Mar 2006 23:51:13 +0000 (23:51 +0000)]
added always_refresh flag. when the mapper loads rows, it will pull objects from the identity map normally, but always blows away their attributes and replaces with those from the database, including changes
Mike Bayer [Sun, 26 Mar 2006 21:44:22 +0000 (21:44 +0000)]
rework to expire() to make it smarter. when you expire(), history is immediately removed as well as explicit from dirty/deleted lists. this also changes uow.rollback_object() to remove from those lists, which is strange that it didnt do that before. anyway the mapper, when selecting and creating instances, asks the uow if this already identity-mapped instance is expired, and if so refreshes it on the fly, saving the need for the re-_get() operation, if some other query happens to touch upon the expired object. unit test added to confirm this.
Mike Bayer [Sun, 26 Mar 2006 06:26:02 +0000 (06:26 +0000)]
util: the __setitem__ method on historyarraylist was meaningless, surprising nobody noticed that.
types: added PickleType, its slightly trickier than trivial, so OK now its standard.
attributes: the level of pain if an AttributeError occurs inside a CallableProp, in combination with an object that implements __getattr__, is too deep for me to put the users through....so convert AttributeErrors to Assertions...
engine: im not a fan of catching universal exceptions and squashing them
Mike Bayer [Sat, 25 Mar 2006 21:44:42 +0000 (21:44 +0000)]
removed circular loop in creating new list elements, fixes a common refresh() condition
added None check in PropertyLoader many-to-one private deletion traversal, fixes byroot_tree (add a unit test for that)
Mike Bayer [Sat, 25 Mar 2006 21:14:54 +0000 (21:14 +0000)]
removed all "tablename + '_' + columname" code and replaced with column._label, to take
advantage of column labeling rules
bind param compilation,when it unique-ifys the name of bind params, maintains the length
of the bind parameter name instead of appending to it
Mike Bayer [Sat, 25 Mar 2006 00:17:51 +0000 (00:17 +0000)]
added expunge() method to objectstore
correction in attributes reset_history to really reset in all cases
added unit tests testing refresh()/expire() bug that was fixed by reset_history thing
Mike Bayer [Sat, 18 Mar 2006 00:12:59 +0000 (00:12 +0000)]
PropertyLoader will not re-determine direction when initialized a second time, as it is re-initialized as a copy made for an inheriting mapper, and no longer can get to the correct inheriting table.
Mike Bayer [Fri, 17 Mar 2006 21:11:59 +0000 (21:11 +0000)]
identified more issues with inheritance. mapper inheritance is more closed-minded about how it creates the join crit
erion as well as the sync rules in inheritance. syncrules have been tightened up to be smarter about creating a new
SyncRule given lists of tables and a join clause. properties also checks for relation direction against the "noninherited table" which for the moment makes it a stronger requirement that a relation to a mapper must relate to that mapper's main table, not any tables that it inherits from.
Mike Bayer [Fri, 17 Mar 2006 02:15:09 +0000 (02:15 +0000)]
refactor to engine to have a separate SQLSession object. allows nested transactions.
util.ThreadLocal __hasattr__ method/raise_error param meaningless, removed
renamed old engines test to reflection
Mike Bayer [Thu, 16 Mar 2006 19:08:35 +0000 (19:08 +0000)]
added txt2myt.py to the genhtml/runhtml scripts, added exception if required modules arent found.
edited tutorial.txt, added particles, etc.
added clue that firebird might be supported to dbengine.myt
Alexey Shamrin [Wed, 15 Mar 2006 13:39:11 +0000 (13:39 +0000)]
Tutorial draft (not finished) and documentation framework improvements
* a first step to a new documentation framework, using Markdown syntax, with
some extensions (detailed in txt2myt.py docstrings):
* `rel:something` for internal links
* `{@name=something}` to override default header names (used when linking)
* `{python}` to force code block to use Python syntax highlighting (not
needed when using examples with `>>>` prompt)
* txt2myt.py -- converter from .txt to .myt
* a draft of tutorial.txt, which uses new syntax
* testdocs.py -- check examples in documentation using doctest (currently only
in tutorial.txt)
Mike Bayer [Tue, 14 Mar 2006 19:51:03 +0000 (19:51 +0000)]
added unique_connection() method to engine, connection pool to return a connection
that is not part of the thread-local context or any current transaction