Part of lp.services.database.collection View In Hierarchy
Known subclasses: lp.translations.model.potemplate.TranslationTemplatesCollection
Works as a Storm wrapper: create a collection based on another collection, adding joins and select conditions to taste.
As in any Storm query, you can select any mix of classes and individual columns or other Storm expressions.
Method | __init__ | Construct a collection, possibly based on another one. |
Method | refine | Return a copy of self with further restrictions, tables etc. |
Method | use | Return a copy of this collection that uses the given store. |
Method | joinInner | Convenience method: inner-join cls into the query. |
Method | joinOuter | Outer-join cls into the query. |
Method | select | Return a result set containing the requested values . |
Method | _parseTablesArg | Turn tables argument into a list. |
Parameters | base | Optional collection that this collection is based on. The new collection will inherit its configuration. |
conditions | Optional Storm select conditions, e.g.
MyClass.attribute > 2 . | |
classes | A class, or tuple or list of classes, that should go into the "FROM" clause of the new collection. This need not include classes that are already in the base collection, or that are included as outer joins. | |
store | Optional: Storm Store to use. |
Parameters | tables | A class, or tuple of classes, or list of classes. |
return | All classes that were passed in, as a list. |
cls
into the query.
This is equivalent to creating a Collection
based on this one
but with cls
and conditions
added.