Ë
    èlÖiÔ  ã                   ó>   — d dl mZ d dlmZ d dlmZ  G d„ de«      Zy)é    )ÚAggregation©ÚNumber)Údefaultc                   ó(   — e Zd ZdZdefd„Zd„ Zd„ Zy)ÚCountaB  
    Count occurences of a value or values.

    This aggregation can be used in three ways:

    1. If no arguments are specified, then it will count the number of rows in the table.
    2. If only :code:`column_name` is specified, then it will count the number of non-null values in that column.
    3. If both :code:`column_name` and :code:`value` are specified, then it will count occurrences of a specific value.

    :param column_name:
        The column containing the values to be counted.
    :param value:
        Any value to be counted, including :code:`None`.
    Nc                 ó    — || _         || _        y ©N)Ú_column_nameÚ_value)ÚselfÚcolumn_nameÚvalues      ú]/var/www/html/strategist-ai/venv_dbt/lib/python3.12/site-packages/agate/aggregations/count.pyÚ__init__zCount.__init__   s   € Ø'ˆÔØˆ�ó    c                 ó   — t        «       S r
   r   ©r   Útables     r   Úget_aggregate_data_typezCount.get_aggregate_data_type   s	   € Ü‹xˆr   c                 óH  — | j                   �‚| j                  t        ur@|j                  | j                      j	                  «       j                  | j                  «      S t        |j                  | j                      j                  «       «      S t        |j                  «      S r
   )	r   r   r   ÚcolumnsÚvaluesÚcountÚlenÚvalues_without_nullsÚrowsr   s     r   Úrunz	Count.run   sx   € Ø×ÑÐ(Ø�{‰{¤'Ñ)Ø—}‘} T×%6Ñ%6Ñ7×>Ñ>Ó@×FÑFÀtÇ{Á{ÓSÐSÜ�u—}‘} T×%6Ñ%6Ñ7×LÑLÓNÓOÐOÜ�5—:‘:‹Ðr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   © r   r   r   r      s   „ ñð $(¨wó òór   r   N)Úagate.aggregations.baser   Úagate.data_typesr   Úagate.utilsr   r   r#   r   r   ú<module>r'      s   ðÝ /Ý #Ý ôˆKõ r   