dfG4dZddlZddlTddlmZddlmZddlmZddlmZ ddlm Z dd lm Z dd lm Zdd lmZdd lmZGd deZdZGddeZGddeZGddeZ Gdde ZGdde Z dS)an Peewee integration with APSW, "another python sqlite wrapper". Project page: https://rogerbinns.github.io/apsw/ APSW is a really neat library that provides a thin wrapper on top of SQLite's C interface. Here are just a few reasons to use APSW, taken from the documentation: * APSW gives all functionality of SQLite, including virtual tables, virtual file system, blob i/o, backups and file control. * Connections can be shared across threads without any additional locking. * Transactions are managed explicitly by your code. * APSW can handle nested transactions. * Unicode is handled correctly. * APSW is faster. N)*)__exception_wrapper__) BooleanField) DateField) DateTimeField) DecimalField)Insert) TimeField)logger)SqliteExtDatabaseceZdZedejdDZfdZdZ dZ dZ fdZ dZ d Zd Zd Zd Zd ZddZdZddZdZdZddZxZS) APSWDatabasec#4K|]}t|VdSN)int).0is r/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/playhouse/apsw_ext.py zAPSWDatabase."s(NNa3q66NNNNNN.c Xi|_tt|j|fi|dSr)_modulessuperr__init__)selfdatabasekwargs __class__s rrzAPSWDatabase.__init__$s5 *lD!!*8>>v>>>>>rc||j|<|s*|||dSdSr)r is_closed connection createmodule)rmod_namemod_insts rregister_modulezAPSWDatabase.register_module(sP"* h~~ ? OO   * *8X > > > > > ? ?rc|j|=dSr)r)rr$s runregister_modulezAPSWDatabase.unregister_module-s M( # # #rctj|jfi|j}|j||jdz ||n#|xYw|S)Ni)apsw Connectionrconnect_params_timeoutsetbusytimeout_add_conn_hooksclose)rconns r_connectzAPSWDatabase._connect0s{t}DD0CDD = $     4 5 5 5    & & & &  JJLLL  s AA/ctt||||dSr)rrr/ _load_modules)rr1rs rr/zAPSWDatabase._add_conn_hooks;s; lD!!11$777 4     rcp|jD]\}}||||Sr)ritemsr#)rr1r$r%s rr4zAPSWDatabase._load_modules?sB"&-"5"5"7"7 2 2 Hh   h 1 1 1 1 rc|jD]#\}\}fd}|||$dS)Nc2jjfSr)stepfinalize)klasssrmake_aggregatez5APSWDatabase._load_aggregates..make_aggregateFsU^< > > > ? ?rcp|jD]\}}|||dSr) _collationsr6createcollation)rr1r?fns r_load_collationszAPSWDatabase._load_collationsJsG(..00 + +HD"  r * * * * + +rcx|jD]\}\}}|||| dSr) _functionsr6createscalarfunction)rr1r?rEr@s r_load_functionszAPSWDatabase._load_functionsNsN&*o&;&;&=&= < < "D"2z  % %dB ; ; ; ; < rs$ ((((((000000******222222000000******222222eeeee$eeeP     =     N=r