Your IP : 3.15.197.189


Current Path : /opt/alt/python313/lib64/python3.13/sqlite3/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/sqlite3/__pycache__/__main__.cpython-313.opt-1.pyc

�

*}gu���SrSSKrSSKrSSKJr SSKJr SSKJr SSjr	"SS\5r
S	r\S
:Xa\"\RSS5 gg)
z�A simple SQLite CLI for the sqlite3 module.

Apart from using 'argparse' for the command-line interface,
this module implements the REPL as a thin wrapper around
the InteractiveConsole class from the 'code' stdlib module.
�N)�ArgumentParser)�InteractiveConsole)�dedentc��URU5Hn[U5 M g![Ra�n[	U5R
n[USURSU3[RS9 O-![a  [USU3[RS9 Of=fU(d[R"S5 SnAgSnAgSnAff=f)z�Helper that wraps execution of SQL code.

This is used both by the REPL and by direct execution from the CLI.

'c' may be a cursor or a connection.
'sql' is the SQL string to execute.
z (z): )�filez: �N)�execute�print�sqlite3�Error�type�__name__�sqlite_errorname�sys�stderr�AttributeError�exit)�c�sql�suppress_errors�row�e�tps      �7/opt/alt/python313/lib64/python3.13/sqlite3/__main__.pyr	r	s���
��9�9�S�>�C��#�J�"���=�=��
�!�W�
�
��	1��R�D��1�-�-�.�c�!��5�C�J�J�G���	1��R�D��1�#�,�S�Z�Z�0�	1����H�H�Q�K�K���
�s8�#&�C�C�*A;�:C�;'B%�"C�$B%�% C�Cc�6^�\rSrSrSrU4SjrSSjrSrU=r$)�SqliteInteractiveConsole�%zA simple SQLite REPL.c�X>�[TU]5 XlUR5Ulg)N)�super�__init__�_con�cursor�_cur)�self�
connection�	__class__s  �rr �!SqliteInteractiveConsole.__init__(s#���
�����	��%�%�'��	�c��U=S:Xa [[R5 g=S:Xa
 [S5 gS:Xa[R"S5 g[R
"U5(dg[
URU5 g)z�Override runsource, the core of the InteractiveConsole REPL.

Return True if more input is needed; buffering is done automatically.
Return False is input is a complete statement ready for execution.
z.versionz.helpzEnter SQL code and press enter.z.quitrTF)r
r�sqlite_versionrr�complete_statementr	r#)r$�source�filename�symbols    r�	runsource�"SqliteInteractiveConsole.runsource-sr������/�/�0�2����7�8��
������
�	��1�1�&�9�9����	�	�6�*�r()r!r#)z<input>�single)	r�
__module__�__qualname__�__firstlineno__�__doc__r r/�__static_attributes__�
__classcell__)r&s@rrr%s����(�
�r(rc	�r�[SSS9nURS[SSSS9 URS	[SS
S9 URSS
SS[R3SS9 UR
"U6nURS:XaSnO[UR5n[RS:XaS[R;aSnOSn[S[RSUSUS35R5nS[l
S[l[R"URSS9nUR (a[#XPR SS9 O [%U5nS SKnUR+US!S"9 UR-5 [R."S 5 g![(a NCf=f!UR-5 f=f)#NzPython sqlite3 CLIzpython -m sqlite3)�description�progr-z:memory:�?zrSQLite database to open (defaults to ':memory:'). A new database is created if the file does not previously exist.)r
�default�nargs�helprzAAn SQL query to execute. Any returned rows are printed to stdout.)r
r=r>z-vz	--version�versionzSQLite version z'Print underlying SQLite library version)�actionr?r>za transient in-memory database�win32zidlelib.runzCTRL-ZzCTRL-Dz2
        sqlite3 shell, running on SQLite version z
        Connected to z}

        Each command will be run using execute() on the cursor.
        Type ".help" for more information; type ".quit" or z to quit.
    zsqlite> z    ... )�isolation_levelF)rr�)�exitmsg)r�add_argument�strrr*�
parse_argsr-�reprr�platform�modulesr�strip�ps1�ps2�connectrr	r�readline�ImportError�interact�closer)�args�parser�db_name�eofkey�banner�con�consolerOs        r�mainrZAs���
�(�
 ��F������j��
O������
�C�s�
7�������k�)�!�'�"8�"8�!9�:�
6���
���d�#�D��}�}�
�"�2���t�}�}�%���|�|�w��=����#C�����
�2�29�2H�2H�1I�J��Y�<�=C�8�D��	�
���
��C�G��C�G�
�/�/�$�-�-��
>�C�
��8�8��C���5�9�/�s�3�G�
��
���V�R��0��	�	���H�H�Q�K��
�
��
��	�	�	��s0�'1F$�F�F$�
F!�F$� F!�!F$�$F6�__main__r)T)r5rr�argparser�coder�textwraprr	rrZr�argv�r(r�<module>rasT����
�#�#���,�1��8>�B�z������!�"���r(

?>