diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-18 19:08:31 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2012-07-18 19:08:31 -0400 |
| commit | e8ff3047c6596d39bb38956eb5aba5651c104e63 (patch) | |
| tree | cbcc704e9388fba6f16bd914c2beede244be9dc8 /lib/sqlalchemy/orm/state.py | |
| parent | 9c0de7fcf7fc56701af446742fe876335aef15b1 (diff) | |
| download | sqlalchemy-e8ff3047c6596d39bb38956eb5aba5651c104e63.tar.gz | |
a lot of docs
Diffstat (limited to 'lib/sqlalchemy/orm/state.py')
| -rw-r--r-- | lib/sqlalchemy/orm/state.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/sqlalchemy/orm/state.py b/lib/sqlalchemy/orm/state.py index 9307c94da..1c7fc2c41 100644 --- a/lib/sqlalchemy/orm/state.py +++ b/lib/sqlalchemy/orm/state.py @@ -54,12 +54,12 @@ class InstanceState(interfaces._InspectionAttr): the mapped object, including its current value and history. - The returned object is an instance of :class:`.InspectAttr`. + The returned object is an instance of :class:`.AttributeState`. """ return util.ImmutableProperties( dict( - (key, InspectAttr(self, key)) + (key, AttributeState(self, key)) for key in self.manager ) ) @@ -508,13 +508,18 @@ class InstanceState(interfaces._InspectionAttr): state.modified = state.expired = False state._strong_obj = None -class InspectAttr(object): +class AttributeState(object): """Provide an inspection interface corresponding to a particular attribute on a particular mapped object. - The :class:`.InspectAttr` object is created by - accessing the :attr:`.InstanceState.attr` - collection. + The :class:`.AttributeState` object is accessed + via the :attr:`.InstanceState.attr` collection + of a particular :class:`.InstanceState`:: + + from sqlalchemy import inspect + + insp = inspect(some_mapped_object) + attr_state = insp.attr.some_attribute """ |
