MCPcopy
hub / github.com/pallets-eco/flask-sqlalchemy / first

Method first

src/flask_sqlalchemy/pagination.py:173–182  ·  view source on GitHub ↗

The number of the first item on the page, starting from 1, or 0 if there are no items. .. versionadded:: 3.0

(self)

Source from the content-addressed store, hash-verified

171
172 @property
173 def first(self) -> int:
174 """The number of the first item on the page, starting from 1, or 0 if there are
175 no items.
176
177 .. versionadded:: 3.0
178 """
179 if len(self.items) == 0:
180 return 0
181
182 return (self.page - 1) * self.per_page + 1
183
184 @property
185 def last(self) -> int:

Callers 1

first_or_404Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected