TokenChangeHistoryCursor#

class gafaelfawr.models.history.TokenChangeHistoryCursor(previous, time, id)#

Bases: DatetimeIdCursor[TokenChangeHistoryRecord]

Pagination cursor for token history entries.

Parameters:

Attributes Summary

id

Unique ID position.

previous

Whether to search backwards instead of forwards.

time

Time position.

Methods Summary

from_entry(entry, *[, reverse])

Construct a cursor with an entry as a bound.

id_column()

Return SQL model attribute holding the ID.

time_column()

Return SQL model attribute holding the time position.

Attributes Documentation

id: int = <dataclasses._MISSING_TYPE object>#

Unique ID position.

previous: bool = <dataclasses._MISSING_TYPE object>#

Whether to search backwards instead of forwards.

time: datetime = <dataclasses._MISSING_TYPE object>#

Time position.

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 reverse is set to True. When the cursor is later applied with apply_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:
Returns:

Requested cursor.

Return type:

safir.database.PaginationCursor

static id_column()#

Return SQL model attribute holding the ID.

Return type:

InstrumentedAttribute

static time_column()#

Return SQL model attribute holding the time position.

Return type:

InstrumentedAttribute