cycquery.ops.Count

class Count(col)[source]

Bases: QueryOp

Count the number of rows.

Parameters:

col (str) – Column to count.

Examples

>>> Count("person_id")(table)

Initialize the count operation.

Methods

__call__(table)[source]

Process the table.

Parameters:
Returns:

Processed table.

Return type:

sqlalchemy.sql.selectable.Subquery

__init__(col)[source]

Initialize the count operation.