| Server IP : 104.129.129.72 / Your IP : 216.73.216.229 Web Server : LiteSpeed System : Linux 123answers 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 User : answe8064 ( 1002) PHP Version : 8.2.28 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/CyberCP/lib64/python3.10/site-packages/sqlparse/__pycache__/ |
Upload File : |
o
d�0h � @ s� d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dZg d �Z ddd�Z
dd
d�Zddd�Zddd�Z
d
S )zParse SQL statements.� )�sql)�cli)�engine)�tokens)�filters)� formatterz0.5.1)r r r r r r Nc C s 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 �encoding� r �D/usr/local/CyberCP/lib/python3.10/site-packages/sqlparse/__init__.py�parse s r
c C s t �� }|�� |�| |�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
�stackr r r r ! s r c K s@ t �� }t�|�}t�||�}|j�t�� � d� |�
| |��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 r r r �format- s
r Fc C s"