MCPcopy
hub / github.com/ormar-orm/ormar / apply

Method apply

ormar/queryset/queries/offset_query.py:14–25  ·  view source on GitHub ↗

Applies the offset clause. :param expr: query to modify :type expr: sqlalchemy.sql.selectable.Select :return: modified query :rtype: sqlalchemy.sql.selectable.Select

(self, expr: sqlalchemy.sql.Select)

Source from the content-addressed store, hash-verified

12 self.query_offset = query_offset
13
14 def apply(self, expr: sqlalchemy.sql.Select) -> sqlalchemy.sql.Select:
15 """
16 Applies the offset clause.
17
18 :param expr: query to modify
19 :type expr: sqlalchemy.sql.selectable.Select
20 :return: modified query
21 :rtype: sqlalchemy.sql.selectable.Select
22 """
23 if self.query_offset:
24 expr = expr.offset(self.query_offset)
25 return expr

Callers

nothing calls this directly

Calls 1

offsetMethod · 0.45

Tested by

no test coverage detected