Package orm2 :: Module relationships :: Class _2many :: Class result
[hide private]
[frames] | no frames]

Class result

source code

object --+
         |
        _2many.result
Known Subclasses:
many2many.result, one2many.result

Instance Methods [hide private]
  __init__(self, dbobj, relationship)
  __iter__(self)
Return those child objects that are associated with the parent's owner through their foreign key.
  select(self, *clauses)
  len(self, *claises)
  append(self, *new_child_objects)
  __len__(self)
Return the number of child dbobjects returned (='contained') in this result.
  ds(self)
  child_class(self)
  where(self)
  add_where(self, clauses)
Add our where clause to clauses.
  __getattr__(self, name)
This function allows access to a dbclass' __result__'s views through a relationship dbattribute.

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__


Properties [hide private]

Inherited from object: __class__


Method Details [hide private]

__init__(self, dbobj, relationship)
(Constructor)

source code 
Parameters:
  • dbobj - The dbobj our parent is a property of.
  • relationship - The parent one2many relationship.
Overrides: object.__init__

__iter__(self)

source code 
Return those child objects that are associated with the parent's owner through their foreign key.

select(self, *clauses)

source code 
None

len(self, *claises)

source code 
None

append(self, *new_child_objects)

source code 
None

__len__(self)
(Length operator)

source code 
Return the number of child dbobjects returned (='contained') in this result. Note that a call to this function will yield a SQL query seperate from the one used to retrieve the the actual objects on every call.

ds(self)

source code 
None

child_class(self)

source code 
None

where(self)

source code 
None

add_where(self, clauses)

source code 
Add our where clause to clauses. If there is a where clause among the clauses already, it will be connected to our where clause using AND.
Returns:
A new set of clauses including the new where clause.

__getattr__(self, name)
(Qualification operator)

source code 
This function allows access to a dbclass' __result__'s views through a relationship dbattribute.
>>> view = parent.relationship.view()
Will return an instance of child.__result__.view initialized to the current result.