class CompositeBundle(orm_util.Bundle):
Undocumented
Method | __init__ |
Construct a new .Bundle . |
Method | create_row_processor |
Produce the "row processing" function for this .Bundle . |
Instance Variable | property |
Undocumented |
Inherited from Bundle
:
Method | __clause_element__ |
Undocumented |
Method | _clone |
Undocumented |
Method | _gen_cache_key |
return an optional cache key. |
Method | label |
Provide a copy of this .Bundle passing a new label. |
Class Variable | _propagate_attrs |
Undocumented |
Class Variable | is_aliased_class |
True if this object is an instance of .AliasedClass . |
Class Variable | is_bundle |
True if this object is an instance of .Bundle . |
Class Variable | is_clause_element |
True if this object is an instance of _expression.ClauseElement . |
Class Variable | is_mapper |
True if this object is an instance of _orm.Mapper . |
Instance Variable | _label |
Undocumented |
Instance Variable | c |
An alias for .Bundle.columns . |
Instance Variable | columns |
A namespace of SQL expressions referred to by this .Bundle . |
Instance Variable | exprs |
Undocumented |
Instance Variable | name |
Undocumented |
Instance Variable | single_entity |
If True, queries for a single Bundle will be returned as a single entity, rather than an element within a keyed tuple. |
Property | clauses |
Undocumented |
Property | entity |
Undocumented |
Property | entity_namespace |
Undocumented |
Property | mapper |
Undocumented |
Inherited from ORMColumnsClauseRole
(via Bundle
):
Class Variable | _role_name |
Undocumented |
Inherited from ColumnsClauseRole
(via Bundle
, ORMColumnsClauseRole
):
Property | _select_iterable |
Undocumented |
Inherited from AllowsLambdaRole
(via Bundle
, ORMColumnsClauseRole
, ColumnsClauseRole
):
Class Variable | allows_lambda |
Undocumented |
Inherited from UsesInspection
(via Bundle
, ORMColumnsClauseRole
, ColumnsClauseRole
):
Class Variable | _post_inspect |
Undocumented |
Class Variable | uses_inspection |
Undocumented |
Inherited from SQLRole
(via Bundle
, ORMColumnsClauseRole
, ColumnsClauseRole
, ColumnListRole
):
Class Variable | allows_lambda |
Undocumented |
Class Variable | uses_inspection |
Undocumented |
Inherited from SupportsCloneAnnotations
(via Bundle
):
Method | _annotate |
return a copy of this ClauseElement with annotations updated by the given dictionary. |
Method | _deannotate |
return a copy of this _expression.ClauseElement with annotations removed. |
Method | _with_annotations |
return a copy of this ClauseElement with annotations replaced by the given dictionary. |
Class Variable | _clone_annotations_traverse_internals |
Undocumented |
Inherited from SupportsAnnotations
(via Bundle
, SupportsCloneAnnotations
):
Property | _annotations_cache_key |
Undocumented |
Inherited from MemoizedHasCacheKey
(via Bundle
):
Method | _generate_cache_key |
return a cache key. |
Inherited from HasCacheKey
(via Bundle
, MemoizedHasCacheKey
):
Class Variable | inherit_cache |
Indicate if this .HasCacheKey instance should make use of the cache key generation scheme used by its immediate superclass. |
Class Method | _generate_cache_attrs |
generate cache key dispatcher for a new class. |
Class Method | _generate_cache_key_for_object |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Class Variable | _hierarchy_supports_caching |
private attribute which may be set to False to prevent the inherit_cache warning from being emitted for a hierarchy of subclasses. |
Class Variable | _is_has_cache_key |
Undocumented |
Inherited from InspectionAttr
(via Bundle
):
Class Variable | __slots__ |
Undocumented |
Class Variable | _is_internal_proxy |
True if this object is an internal proxy object. |
Class Variable | is_attribute |
True if this object is a Python :term:`descriptor`. |
Class Variable | is_instance |
True if this object is an instance of .InstanceState . |
Class Variable | is_property |
True if this object is an instance of .MapperProperty . |
Class Variable | is_selectable |
Return True if this object is an instance of _expression.Selectable . |
sqlalchemy.orm.util.Bundle.__init__
Construct a new .Bundle
.
e.g.:
bn = Bundle("mybundle", MyClass.x, MyClass.y) for row in session.query(bn).filter( bn.c.x == 5).filter(bn.c.y == 4): print(row.mybundle.x, row.mybundle.y)
Parameters | |
property_ | Undocumented |
expr | Undocumented |
name | name of the bundle. |
*exprs | columns or SQL expressions comprising the bundle. |
single_entity=False | if True, rows for this .Bundle
can be returned as a "single entity" outside of any enclosing tuple
in the same manner as a mapped entity. |
Produce the "row processing" function for this .Bundle
.
May be overridden by subclasses.
See Also
:ref:`bundles` - includes an example of subclassing.