TokenChangeHistoryCursor#
- class gafaelfawr.models.history.TokenChangeHistoryCursor(previous, time, id)#
Bases:
DatetimeIdCursor[TokenChangeHistoryRecord]Pagination cursor for token history entries.
Attributes Summary
Unique ID position.
Whether to search backwards instead of forwards.
Time position.
Methods Summary
from_entry(entry, *[, reverse])Construct a cursor with an entry as a bound.
Return SQL model attribute holding the ID.
Return SQL model attribute holding the time position.
Attributes Documentation
-
previous:
bool= <dataclasses._MISSING_TYPE object># Whether to search backwards instead of forwards.
Methods Documentation
- classmethod from_entry(entry, *, reverse=False)#
Construct a cursor with an entry as a bound.
Builds a cursor to get the entries after the provided entry, or before the provided entry if
reverseis set toTrue. When the cursor is later applied withapply_cursor, forward cursors (the default) must include the entry the cursor was based on. Reverse cursors must exclude the given entry and return data starting with the entry immediately previous.- Parameters:
entry (
TokenChangeHistoryRecord) – Basis of the cursor.reverse (
bool, default:False) – Whether to create a previous cursor.
- Returns:
Requested cursor.
- Return type:
- static id_column()#
Return SQL model attribute holding the ID.
- Return type:
- static time_column()#
Return SQL model attribute holding the time position.
- Return type:
-
previous: