MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / limit_clause

Method limit_clause

lib/sqlalchemy/dialects/sqlite/base.py:1509–1519  ·  view source on GitHub ↗
(self, select, **kw)

Source from the content-addressed store, hash-verified

1507 )
1508
1509 def limit_clause(self, select, **kw):
1510 text = ""
1511 if select._limit_clause is not None:
1512 text += "\n LIMIT " + self.process(select._limit_clause, **kw)
1513 if select._offset_clause is not None:
1514 if select._limit_clause is None:
1515 text += "\n LIMIT " + self.process(sql.literal(-1))
1516 text += " OFFSET " + self.process(select._offset_clause, **kw)
1517 else:
1518 text += " OFFSET " + self.process(sql.literal(0), **kw)
1519 return text
1520
1521 def for_update_clause(self, select, **kw):
1522 # sqlite has no "FOR UPDATE" AFAICT

Callers

nothing calls this directly

Calls 1

processMethod · 0.45

Tested by

no test coverage detected