| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- fixed table comparison example in metadata.txt
- docstrings all over the place
- renamed mapper _getattrbycolumn/_setattrbycolumn to get_attr_by_column,set_attr_by_column
- removed frommapper parameter from populate_instance(). the two operations can be performed separately
- fix to examples/adjacencytree/byroot_tree.py to fire off lazy loaders upon load, to reduce query calling
- added get(), get_by(), load() to MapperExtension
- re-implemented ExtensionOption (called by extension() function)
- redid _ExtensionCarrier to function dynamically based on __getattribute__
- added logging to attributes package, indicating the execution of a lazy callable
- going to close [ticket:329]
|
| |
|
| |
|
|
|
|
|
| |
keyword argument to relation(). the old way still works but is
deprecated [ticket:212]
|
|
|
|
|
|
|
| |
behavior
- fix attribute unit test
- attributes have explicit flag for "mutable_scalars", propigated by ColumnProperty
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
test objects
- added copy_function, compare_function arguments to InstrumentedAttribute
- added MutableType mixin, copy_value/compare_values methods to TypeEngine,
PickleType
- ColumnProperty and DeferredProperty propigate the TypeEngine copy/compare
methods to the attribute instrumentation
- cleanup of UnitOfWork, removed unused methods
- UnitOfWork "dirty" list is calculated across the total collection of persistent
objects when called, no longer has register_dirty.
- attribute system can still report "modified" status fairly quickly, but does
extra work for InstrumentedAttributes that have detected a "mutable" type where
catching the __set__() event is not enough (i.e. PickleTypes)
- attribute tracking modified to be more intelligent about detecting
changes, particularly with mutable types. TypeEngine objects now
take a greater role in defining how to compare two scalar instances,
including the addition of a MutableType mixin which is implemented by
PickleType. unit-of-work now tracks the "dirty" list as an expression
of all persistent objects where the attribute manager detects changes.
The basic issue thats fixed is detecting changes on PickleType
objects, but also generalizes type handling and "modified" object
checking to be more complete and extensible.
|
|
|
|
|
|
| |
- added "batch=True" flag to mapper; if False, save_obj
will fully save one object at a time including calls
to before_XXXX and after_XXXX
|
| |
|
|
|
|
| |
artifact of compilation brought this up
|
|
|
|
| |
without that flag as its impossible to load all lazy loaders, deal with attributes that "noload", etc. just to check for orphan status.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
operation
now sets a "hasparent" flag for all attributes to all objects. that way lazy loads
via callables get included in trackparent, and eager loads do as well because the mapper
calls commit() on all objects at load time. this is a less shaky method than the "optimistic"
thing in the previous commit, but uses more memory and involves more overhead.
- some tweaks/cleanup to unit tests
|
|
|
|
|
|
|
|
|
|
| |
"hasparent" flags on objects as they are loaded, both from lazy and eager loads,
the "orphan" check now uses an "optimistic" flag to determine the result if no
"hasparent" flag is found for a particular relationship on an instance. if the
instance has an _instance_key and therefore was loaded from the database, it is
assumed to not be an orphan unless a "False" hasparent flag has been set. if the
instance does not have an _instance_key and is therefore transient/pending, it is
assumed to be an orphan unless a "True" hasparent flag has been set.
|
| |
|
|
|
|
| |
stuck in there...
|
| |
|
| |
|
|
|
|
|
| |
AttributeHistory object if an untriggered callable was found (not sure how this used to work
OK....)
|
|
|
|
| |
attributes for a descendant class, + 2 unit tests
|
|
|
|
| |
doesnt actually "remove" the items from teh replaced list just marks them as "removed" from the parent object for history purposes
|
|
|
|
| |
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
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
unit test for the whole thing
|
| |
|
|
|
|
| |
attributes
|
|
|
|
|
|
|
|
| |
with a class via
the class object as well as the optional entity_name parameter, which is a string defaulting to None.
any number of primary mappers can be created for a class, qualified by the entity name. instances of those classes
will issue all of their load and save operations through their entity_name-qualified mapper, and maintain separate identity from an otherwise equilvalent object.
|
|
|
|
| |
initializers strictly through the SmartPropery instances attached to the class, so that attributes retain their natural polymorphic behavior. naming conventions migrating to "managed_attribute", simplifying codepaths.
|
|
|
|
| |
attribute-level TriggeredAttribute set on it, added unit test.
|
|
|
|
| |
attribute to break circular refs, slightly shorter codepaths in some cases. added performance tester
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
refresh() condition
added None check in PropertyLoader many-to-one private deletion traversal, fixes byroot_tree (add a unit test for that)
|
|
|
|
|
| |
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
|
|
|
|
| |
to eliminate circular references on objects
|
|
|
|
| |
attributes on new objects
|
|
|
|
| |
blown away if it hadnt been loaded
|
| |
|
| |
|
| |
|
|
|
|
| |
attributes, util
|
|
|
|
|
| |
version has "property" accessor which returns MapperProperty at
the class level
|
| |
|
|
|
|
|
|
|
|
|
| |
rolled the BackrefExtensions into a single GenericBackrefExtension to handle
all combinations of list/nonlist properties (such as one-to-one)
tweak to properties.py which may receive "None" as "added_items()", in the case of a scalar property
instead of a list
PropHistory masquerades as a List on the setattr/append delattr/remove side to make one-to-one's automatically
work
|
| |
|
| |
|
|
|
|
| |
attributeerror
|