Ë
    �ïŒh°  ã                   óˆ   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 d	Z
g d
¢Zdd„Zdd„Zdd„Zdd„Zy)zParse SQL statements.é    )Úsql)Úcli)Úengine)Útokens)Úfilters)Ú	formatter)Ú	text_typez0.2.4)r   r   r   r   r   r   Nc                 ó,   — t        t        | |«      «      S )zôParse sql and return a list of statements.

    :param sql: A string containing one or more SQL statements.
    :param encoding: The encoding of the statement (optional).
    :returns: A tuple of :class:`~sqlparse.sql.Statement` instances.
    )ÚtupleÚparsestream)r   Úencodings     úT/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/sqlparse/__init__.pyÚparser      s   € ô ”˜S (Ó+Ó,Ð,ó    c                 ón   — t        j                  «       }|j                  «        |j                  | |«      S )zçParses sql statements from file-like object.

    :param stream: A file-like object.
    :param encoding: The encoding of the stream contents (optional).
    :returns: A generator of :class:`~sqlparse.sql.Statement` instances.
    )r   ÚFilterStackÚenable_groupingÚrun)Ústreamr   Ústacks      r   r   r   "   s/   € ô ×ÑÓ €EØ	×ÑÔØ�9‰9�V˜XÓ&Ð&r   c                 ó  — t        j                  «       }t        j                  |«      }t        j                  ||«      }|j
                  j                  t        j                  «       «       dj                  |j                  | |«      «      S )a'  Format *sql* according to *options*.

    Available options are documented in :ref:`formatting`.

    In addition to the formatting options this function accepts the
    keyword "encoding" which determines the encoding of the statement.

    :returns: The formatted SQL statement as string.
    Ú )r   r   r   Úvalidate_optionsÚbuild_filter_stackÚpostprocessÚappendr   ÚSerializerUnicodeÚjoinr   )r   r   Úoptionsr   s       r   Úformatr    .   sk   € ô ×ÑÓ €EÜ×(Ñ(¨Ó1€GÜ×(Ñ(¨°Ó8€EØ	×Ñ×ÑœW×6Ñ6Ó8Ô9Ø�8‰8�E—I‘I˜c 8Ó,Ó-Ð-r   c                 ó¢   — t        j                  «       }|j                  | |«      D �cg c]  }t        |«      j	                  «       ‘Œ c}S c c}w )zÉSplit *sql* into single statements.

    :param sql: A string containing one or more SQL statements.
    :param encoding: The encoding of the statement (optional).
    :returns: A list of strings.
    )r   r   r   r	   Ústrip)r   r   r   Ústmts       r   Úsplitr$   ?   s>   € ô ×ÑÓ €EØ05·	±	¸#¸xÓ0HÖI¨ŒI�d‹O×!Ñ!Õ#ÒIÐIùÒIs   © A)N)Ú__doc__Úsqlparser   r   r   r   r   r   Úsqlparse.compatr	   Ú__version__Ú__all__r   r   r    r$   © r   r   ú<module>r+      s@   ðñ õ Ý Ý Ý Ý Ý å %à€Ú
D€ó-ó	'ó.ô"Jr   