cycquery.ops.Limit

class Limit(number)[source]

Bases: QueryOp

Limit the number of rows returned in a query.

Parameters:

number (int) – Number of rows to return in the limit.

Examples

>>> Limit(10)(table)

Initialize the operation.

Methods

__call__(table)[source]

Process the table.

Parameters:

table (Union[Select, Subquery, Table, DBTable]) – Table on which to perform the operation.

Returns:

Processed table.

Return type:

sqlalchemy.sql.selectable.Subquery

__init__(number)[source]

Initialize the operation.