chat.collections.chat
Classes
Manages a list of chats. |
Module Contents
- class chat.collections.chat.ChatCollection(session: sqlalchemy.orm.Session, page: int = 0, state: str = 'active', group: str | None = None, owner: str = '*')[source]
Bases:
onegov.core.collection.GenericCollection
[onegov.chat.models.Chat
],onegov.core.collection.Pagination
[onegov.chat.models.Chat
]Manages a list of chats.
Use it like this:
from onegov.people import ChatCollection chats = ChatCollection(session)
- __eq__(other: object) bool [source]
Returns True if the current and the other Pagination instance are equal. Used to find the current page in a list of pages.
- subset() Query[Chat] [source]
Returns an SQLAlchemy query containing all records that should be considered for pagination.
- page_by_index(index: int) Self [source]
Returns the page at the given index. A page here means an instance of the class inheriting from the
Pagination
base class.