Ë 6´ÿ'Ÿä‹ãó–—dZddlZddlZddlmZddlmZddlmZd d„Z Gd„de«Z d „Z e d k(re ejd d«yy) 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ó¦— |j|«D] }t|«Œy#tj$r™}t |«j } t|›d|j ›d|›�tj¬«n/#t$r#t|›d|›�tj¬«YnwxYw|stjd«Yd}~yYd}~yd}~wwxYw)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 ú'/usr/lib/python3.12/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ó*‡—eZdZdZˆfd„Zdd„ZˆxZS)ÚSqliteInteractiveConsolezA simple SQLite REPL.cóZ•—t‰|�«||_|j«|_y)N)ÚsuperÚ__init__Ú_conÚcursorÚ_cur)ÚselfÚ connectionÚ __class__s €rrz!SqliteInteractiveConsole.__init__(s%ø€Ü ‰ÑÔØˆŒ Ø×%Ñ%Ó'ˆ� ócóú—|xdk(rttj›«yxdk(r td«ydk(rtjd«y tj |«syt |j|«y)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Ú runsourcez"SqliteInteractiveConsole.runsource-so€ð ÝÜœ×/Ñ/Ð0Ô2ðõÜÐ7Ô8ðó Ü—‘˜” ð ð Ü×1Ñ1°&Ô9ØÜ˜Ÿ ™  6Ô*Ør&)zÚsingle)rÚ __module__Ú __qualname__Ú__doc__rr-Ú __classcell__)r%s@rrr%sø„Ùô(÷ r&rc ó^—tdd¬«}|jdtddd¬«|jd tdd ¬ «|jd d ddtj›�d¬«|j |Ž}|j dk(rd}nt|j «}tjdk(rdtjvrd}nd}tdtj›d|›d|›d�«j«}dt_ dt_tj|j d¬«} |j rt#||j d¬«nt%|«}|j'|d ¬!«|j)«tj*d"«y#|j)«wxYw)#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 r8r9z-vz --versionÚversionzSQLite version z'Print underlying SQLite library version)Úactionr:r9za transient in-memory databaseÚwin32z idlelib.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)rÚ)Úexitmsgr)rÚ add_argumentÚstrr r(Ú parse_argsr+ÚreprrÚplatformÚmodulesrÚstripÚps1Úps2Úconnectrr rÚinteractÚcloser)ÚargsÚparserÚdb_nameÚeofkeyÚbannerÚconÚconsoles rÚmainrSAs§€Ü Ø(Ø ô€Fð ×ÑØœ j¸ð Oðôð ×ÑØ ”C˜sð 7ðôð ×ÑØ ˆk )Ø!¤'×"8Ñ"8Ð!9Ð:Ø 6ðôð ˆ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øð � ‰ � ús Ä1AFÆF,Ú__main__r)T)r1r rÚargparserÚcoderÚtextwraprr rrSrÚargv©r&rÚrZsTðñó Û å#Ý#Ýóô,Ð1ôò8:ðz ˆzÒÙˆ�‰�!�"ˆÕðr&