!o\SrSSKrSSKrSSKJr SSKJr SSKJr S Sjr "SS\5r S r \ S :Xa\ "\RS S5 gg) zA 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)dedentcURU5Hn[U5 M g![Ran[ U5R n[USUR SU3[RS9 O-![a [USU3[RS9 Of=fU(d[R"S5 SnAgSnAgSnAff=f)zHelper 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) executeprintsqlite3Errortype__name__sqlite_errornamesysstderrAttributeErrorexit)csqlsuppress_errorsrowetps 7/opt/alt/python313/lib64/python3.13/sqlite3/__main__.pyr r s 99S>C #J" == !W   1 RD1--.c!5CJJ G 1 RD1#,SZZ 0 1 HHQKK s8#&CC*A;:C;'B%"C$B%% CCc6^\rSrSrSrU4SjrSSjrSrU=r$)SqliteInteractiveConsole%zA simple SQLite REPL.cX>[TU]5 XlUR5Ulg)N)super__init___concursor_cur)self connection __class__s rr !SqliteInteractiveConsole.__init__(s#  %%' cU=S:Xa [[R5 g=S:Xa [S5 gS:Xa[R"S5 g[R "U5(dg[ URU5 g)zOverride 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_versionrrcomplete_statementr r#)r$sourcefilenamesymbols r runsource"SqliteInteractiveConsole.runsource-sr //0278   11&99 6*r()r!r#)zsingle) r __module__ __qualname____firstlineno____doc__r r/__static_attributes__ __classcell__)r&s@rrr%s( r(rc r[SSS9nURS[SSSS9 URS [SS S 9 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) descriptionprogr-z:memory:?zrSQLite database to open (defaults to ':memory:'). A new database is created if the file does not previously exist.)r defaultnargshelprzAAn SQL query to execute. Any returned rows are printed to stdout.)r r=r>z-vz --versionversionzSQLite version z'Print underlying SQLite library version)actionr?r>za transient in-memory databasewin32z 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)rr)exitmsg)r add_argumentstrr r* parse_argsr-reprrplatformmodulesrstripps1ps2connectrr rreadline ImportErrorinteractcloser)argsparserdb_nameeofkeybannerconconsolerOs rmainrZAs ( F j O  Cs 7  k)!'"8"8!9: 6   d #D }} "2t}}% ||w= #C 2292H2H1IJY<=C8D    CGCG //$-- >C  88 C5 9/s3G    VR  0 HHQK    s0'1F$FF$ F!F$ F!!F$$F6__main__r)T)r5r rargparsercodertextwraprr rrZrargvr(rrasT  ##,18>B z!"r(