GIF89a=( õ' 7IAXKgNgYvYx\%wh…hŽth%ˆs%—x¨}9®Œ©€&©‰%¶†(¹–.¹5·œD¹&Çš)ÇŸ5ǘ;Í£*È¡&Õ²)ׯ7×µ<Ñ»4ï°3ø‘HÖ§KͯT÷¨Yÿšqÿ»qÿÔFØ !ù ' !ÿ NETSCAPE2.0 , =( þÀ“pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§gª«ªE¯°¨¬ª±²Œ¹º¹E¾­”´ÂB¶¯ §Åȸ»ÑD¾¿Á•ÄÅ®° ÝH¾ÒLÀÆDÙ«D¶BÝïðÀ¾DÑÑÔTÌÍíH òGö¨A RÎڐ |¥ ٭&ºìE8œ¹kGÔAÞpx­a¶­ã R2XB®åE8I€Õ6Xî:vT)äžþÀq¦è³¥ì仕F~%xñ  4#ZÔ‰O|-4Bs‘X:= QÉ œš lºÒyXJŠGȦ|s hÏíK–3l7·B|¥$'7Jީܪ‰‡àá”Dæn=Pƒ ¤Òëí‰`䌨ljóá¯Éüv>á–Á¼5 ½.69ûϸd«­ºÀûnlv©‹ªîf{¬ÜãPbŸ  l5‘ޝpß ´ ˜3aÅùäI«O’ý·‘áÞ‡˜¾Æ‚ÙÏiÇÿ‹Àƒ #öó)pâš Þ½ ‘Ý{ó)vmÞü%D~ 6f s}ŃƒDØW Eþ`‡þ À…L8xá†ç˜{)x`X/> Ì}mø‚–RØ‘*|`D=‚Ø_ ^ð5 !_…'aä“OÚ—7âcð`D”Cx`ÝÂ¥ä‹éY¹—F¼¤¥Š?¡Õ™ n@`} lď’ÄÉ@4>ñd œ à‘vÒxNÃ×™@žd=ˆgsžG±æ ´²æud &p8Qñ)ˆ«lXD©øÜéAžHìySun jª×k*D¤LH] †¦§C™Jä–´Xb~ʪwStŽ6K,°£qÁœ:9ت:¨þªl¨@¡`‚ûÚ ».Û¬¯t‹ÆSÉ[:°=Š‹„‘Nåû”Ìî{¿ÂA ‡Rà›ÀÙ6úë°Ÿð0Ä_ ½;ÃϱîÉì^ÇÛÇ#Ëë¼ôº!±Ä˜íUîÅÇ;0L1óÁµö«p% AÀºU̬ݵ¼á%霼€‡¯Á~`ÏG¯»À× ­²± =4ªnpð3¾¤³¯­ü¾¦îuÙuµÙ®|%2ÊIÿür¦#0·ÔJ``8È@S@5ê¢ ö×Þ^`8EÜ]ý.뜃Âç 7 ú ȉÞj œ½Dç zý¸iþœÑÙûÄë!ˆÞÀl§Ïw‹*DçI€nEX¯¬¼ &A¬Go¼QföõFç°¯;é¦÷îŽêJ°îúôF5¡ÌQ|îúöXªæ»TÁÏyñêï]ê² o óÎC=öõ›ÒÓPB@ D×½œä(>èCÂxŽ`±«Ÿ–JЀ»Û á¤±p+eE0`ëŽ`A Ú/NE€Ø†À9‚@¤à H½7”à‡%B‰`Àl*ƒó‘–‡8 2ñ%¸ —€:Ù1Á‰E¸àux%nP1ð!‘ðC)¾P81lÑɸF#ˆ€{´âé°ÈB„0>±û °b¡Š´±O‚3È–Ù()yRpbµ¨E.Z‘D8ÊH@% òŒx+%Ù˜Æcü »¸˜fõ¬b·d`Fê™8èXH"ÉÈ-±|1Ô6iI, 2““¬$+](A*jÐ QTÂo‰.ÛU슬Œã„Ž`¯SN¡–¶Äåyše¯ª’­¬‚´b¦Éož œ)åyâ@Ì®3 ÎtT̉°&Ø+žLÀf"Ø-|žçÔ>‡Ðv¦Ðžì\‚ Q1)Ž@Žh#aP72”ˆ™¨$‚ !ù " , =( …7IAXG]KgNgYvYxR"k\%w]'}hŽth%ˆg+ˆs%—r.—m3šx3˜x¨}9®€&©€+¨‡7§‰%¶†(¹–.¹œD¹&ǘ;Í•&ײ)×»4ïÌ6ò§KÍ þ@‘pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g «¬ E ±± ¨­¶°ººE Á´”·®C¬²§Ç¶Œ»ÓDÃÕƷ¯Ê±H½ºM×ÁGÚ¬D¶BËÁ½î½DÓôTÏÛßîG»ôõC×CÌ l&âž:'òtU³6ɹ#·Ø)€'Ü.6±&ëÍÈ» K(8p0N?!æ2"ÛˆNIJX>R¼ÐO‚M '¡¨2¸*Ÿþ>#n↠å@‚<[:¡Iïf’ ¤TÚ˘CdbÜÙ“[«ŽEú5MBo¤×@€`@„€Êt W-3 ¶Ÿ¡BíêäjIÝ…Eò9[T…$íêﯧ„…•s»Óȳ¹€ÅÚdc®UUρ#±Ùïldj?´í¼²`\ŽÁðÞu|3'ÖŒ]ë6 ¶S#²‡˜FKLÈ *N E´‘áäŠ$˜›eÄYD„ºq«.è촁ƒs \-ÔjA 9²õ÷å- üúM[Âx(ís÷ì®x€|í¡Ù’p¦‚ ŽkÛTÇDpE@WÜ ²Ç]kŠ1¨ þ€·Yb ÓÁ‰l°*n0 ç™—žzBdОu¾7ĉBl€â‰-ºx~|UåU‰  h*Hœ|e"#"?vpÄiŠe6^ˆ„+qâŠm8 #VÇá ‘å–ÄV„œ|Аè•m"сœn|@›U¶ÆÎž—Špb¥G¨ED”€±Úê2FÌIç? >Éxå Œ± ¡¤„%‘žjŸ‘ꄯ<Ìaà9ijÐ2˜D¦È&›†Z`‚å]wþ¼Â:ç6àB¤7eFJ|õÒ§Õ,¨äàFÇ®cS·Ê¶+B°,‘Þ˜ºNûãØ>PADÌHD¹æž«ÄÀnÌ¥}­#Ë’ë QÀÉSÌÂÇ2ÌXÀ{æk²lQÁ2«ÊðÀ¯w|2Í h‹ÄÂG€,m¾¶ë3ÐÙ6-´ÅE¬L°ÆIij*K½ÀÇqï`DwVÍQXœÚÔpeœ±¬Ñ q˜§Tœ½µƒ°Œìu Â<¶aØ*At¯lmEØ ü ôÛN[P1ÔÛ¦­±$ÜÆ@`ùåDpy¶yXvCAyåB`ŽD¶ 0QwG#¯ æš[^Äþ $ÀÓÝǦ{„L™[±úKÄgÌ;ï£S~¹ìGX.ôgoT.»åˆ°ùŸûù¡?1zö¦Ÿž:ÅgÁ|ìL¹ „®£œŠ‚à0œ]PÁ^p F<"•ç?!,ñ‡N4—…PÄ Á„ö¨Û:Tè@hÀ‹%táÿ:ø-žI<`þ‹p I….)^ 40D#p@ƒj4–؀:²‰1Øâr˜¼F2oW¼#Z†;$Q q” ‘ ÂK¦ñNl#29 !’F@¥Bh·ᏀL!—XFóLH‘Kh¤.«hE&JòG¨¥<™WN!€ÑÙÚˆY„@†>Œž19J" 2,/ &.GXB%ÌRÈ9B6¹W]’î×ÔW¥’IÎ$ ñ‹ÓŒE8YÆ ¼³™ñA5“à®Q.aŸB€&Ø©³ JÁ—! ¦t)K%tœ-¦JF bòNMxLôþ)ÐR¸Ð™‘ èÝ6‘O!THÌ„HÛ ‰ !ù ) , =( …AXKgNgYvYxR"k\%wh…hŽh%ˆg+ˆs%—r.—x3˜x¨}9®€&©€+¨Œ,©‡7§‰%¶†(¹–.¹5·&Çš)ǘ;Í•&×£*Ȳ)ׯ7×»4ï°3øÌ6ò‘HÖ§KÍ»Hó¯T÷¨Yÿ»qÿÇhÿ þÀ”pH,È¤rÉl:ŸÐ¨tJ­Z¯Ø¬vËíz¿à°xL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~Ïïûÿ€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§g ª« E$±²¨ª­ · °²½$E$ÂÕ««D· Í ¿¦Ç¶¸ÌŒ¾³CÃÅÆ E ééH½MÛÂGâªD­ çBêêϾD²ÒaÀà€Š1r­ðÓ¤ ÔožzU!L˜C'¾yW½UGtäÇïÙllê0×àÂuGþ)AÀs[þ·xì ÁxO%ƒûX2ó—  P£n›R/¡ÑšHše+êDm?# —‘Ç£6¡8íJ¡ŸâDiäªM¥Ö„ôj“¬¹£5oQ7°- <‡ *´lãÓŒ2r/a!l)dÈ A™ÈE¢ôÔ͆…ð ;Ö˜c ¡%ß‚’Ùˆâ¸b½—pe~C"BíëÚHïeF2§æŠ8qb t_`urŠeü wÅu3êæPv§h•"ß`íÍxçLĹÜÖ3á  ~Öº“®›¸ÏMDfJÙ °„ÛµáWõ%§œ‚à©–‚X ÓØ)@®Ñ›Eþ´wëuÅSxb8y\mÖzœ¥§ZbºE—ÂLªÌw!y(>¡™wú=Ç|ÅÝs¢d €CÁW)HÜcC$€L Ä7„r.á\{)@ð` @ äXÈ$PD” `šaG:§æˆOˆ72EÐamn]ù"ŒcÊxÑŒ° &dR8`g«iÙŸLR!¦P …d’ä¡“¦ðÎTƒ¦ià|À _ ¥ Qi#¦Šg›Æ ›noMµ ›V ã£)p ç£ÎW…š=Âeªk§†j„ ´®1ß²sÉxéW«jšl|0¯B0Û, \jÛ´›6±¬¶C ÛíWþï|ëÙ‹¸ñzĸV {ì;Ýñn¼òVˆm³I¼³.Ðã¤PN¥ ²µ¼„µCã+¹ÍByî£Ñ¾HŸ›ëê 7ìYÆFTk¨SaoaY$Dµœìï¿Ã29RÈkt Çïfñ ÇÒ:ÀÐSp¹3ÇI¨â¥DZÄ ü9Ïýögñ½­uÔ*3)O‘˜Ö[_hv ,àî×Et Ÿé¶BH€ Õ[ü±64M@ÔSÌM7dÐl5-ÄÙU܍´©zߌ3Ô€3ž„ „ ¶ÛPô½5×g› êÚ˜kN„Ý…0Îj4€Ìë°“#{þÕ3S2çKÜ'ợlø¼Ú2K{° {Û¶?žm𸧠ËI¼nEò='êüóºè^üæÃ_Û=°óž‚ì#Oý¿Í'¡½áo..ÏYìnüñCœO±Áa¿¢Kô½o,üÄËbö²çºíï{ËC Ú— "”Ï{ËK ÍÒw„õ±Oz dÕ¨à:$ ƒô—«v»] A#ð «€¿šéz)Rx׿ˆ¥‚d``èw-îyÏf×K!ð€þ­Ð|ìPľ„=Ì`ý(f” 'Pa ¥ÐBJa%Ðâf§„%Š¡}FàáÝ×6>ÉäŠG"éŽè=ø!oа^FP¼Ø©Q„ÀCÙÁ`(Ž\ÄÝ® ©Â$<n@dÄ E#ììUÒI! ‚#lù‹`k¦ÐÇ'Rró’ZýNBÈMF Í[¤+‹ðɈ-áwj¨¥þ8¾rá ,VÂh„"|½œ=×G_¦Ñ™EØ 0i*%̲˜Æda0mV‚k¾)›;„&6 p>ÓjK “¦Ç# âDÂ:ûc?:R Ó¬fÞéI-Ì“•Ã<ä=™Ï7˜3œ¨˜c2ŒW ,ˆ”8(T™P‰F¡Jhç"‚ ; 403WebShell
403Webshell
Server IP : 104.21.83.152  /  Your IP : 216.73.216.195
Web Server : LiteSpeed
System : Linux premium229.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
User : akhalid ( 749)
PHP Version : 8.3.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/hc_python/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/hc_python/lib/python3.12/site-packages/sqlalchemy/ext/__pycache__/baked.cpython-312.pyc
�

p��gYE����dZddlmZddlZddlmZddlmZddl	mZ
ddlmZddl
mZddlmZdd	lmZddlmZej&e�ZGd
�d�ZGd�d
�ZGd�d�Zej2Zy)z�Baked query extension.

Provides a creational pattern for the :class:`.query.Query` object which
allows the fully constructed object, Core select statement, and string
compiled result to be fully cached.


�N�)�exc)�util)�Query)�Session)�func)�literal_columnc� �eZdZdZdZd�Zd�Zy)�Bakeryz�Callable which returns a :class:`.BakedQuery`.

    This object is returned by the class method
    :meth:`.BakedQuery.bakery`.  It exists as an object
    so that the "cache" can be easily inspected.

    .. versionadded:: 1.2


    ��cls�cachec� �||_||_y�Nr)�self�cls_rs   �E/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/ext/baked.py�__init__zBakery.__init__1s�������
�c�<�|j|j||�Srr)r�
initial_fn�argss   r�__call__zBakery.__call__5s���x�x��
�
�J��5�5rN)�__name__�
__module__�__qualname__�__doc__�	__slots__rr�rrrr#s��	��I��6rrc��eZdZdZdZdd�Zedd��Zd�Zdd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zdd�Zd�Zdd�Zdd�Zd�Zd�Zd�Zd�Zy)�
BakedQueryz3A builder object for :class:`.query.Query` objects.)�steps�_bakery�
_cache_key�_spoiledc�b�d|_|j||�|g|_d|_||_y)NrF)r$�_update_cache_keyr"r%r#)r�bakeryrrs    rrzBakedQuery.__init__>s0��������z�4�0� �\��
���
���rNc�D�t|tj||���S)zSConstruct a new bakery.

        :return: an instance of :class:`.Bakery`

        )�
size_alert)rr�LRUCache)r
�size�_size_alerts   rr(zBakedQuery.bakeryEs���c�4�=�=��+�F�G�Grc���tjt�}|j|_t|j�|_|j
|_|j|_|Sr)r!�__new__r$�listr"r#r%)r�b1s  r�_clonezBakedQuery._cloneOsH��
�
�
�
�
+������
���
�
�#����\�\��
��m�m����	rc�J�|xj|jf|zz
c_yr)r$�__code__�r�fnrs   rr'zBakedQuery._update_cache_keyWs�����B�K�K�>�D�0�0�rc�j�t|t�r|j|�|S|j|�|Sr)�
isinstance�tuple�add_criteria�r�others  r�__iadd__zBakedQuery.__iadd__Zs8���e�U�#��D���u�%���
���e�$��rc�b�t|t�r|j|�S|j|�Sr)r8r9�
with_criteriar;s  r�__add__zBakedQuery.__add__as0���e�U�#�%�4�%�%�u�-�-��%�%�e�,�,rc�`�|j||�|jj|�|S)z�Add a criteria function to this :class:`.BakedQuery`.

        This is equivalent to using the ``+=`` operator to
        modify a :class:`.BakedQuery` in-place.

        )r'r"�appendr5s   rr:zBakedQuery.add_criteriags+��	
���r�4�(��
�
���"���rc�D�|j�j|g|���S)z�Add a criteria function to a :class:`.BakedQuery` cloned from this
        one.

        This is equivalent to using the ``+`` operator to
        produce a new :class:`.BakedQuery` with modifications.

        )r2r:r5s   rr?zBakedQuery.with_criteriars"��*�t�{�{�}�)�)�"�4�t�4�4rc��t||�S)z�Return a :class:`_baked.Result` object for this
        :class:`.BakedQuery`.

        This is equivalent to calling the :class:`.BakedQuery` as a
        Python callable, e.g. ``result = my_baked_query(session)``.

        )�Result�r�sessions  r�for_sessionzBakedQuery.for_session|s���d�G�$�$rc�$�|j|�Sr)rHrFs  rrzBakedQuery.__call__�s������(�(rc��|sC|js7|j�}|xjdz
c_|jg|_d|_|S)a�Cancel any query caching that will occur on this BakedQuery object.

        The BakedQuery can continue to be used normally, however additional
        creational functions will not be cached; they will be called
        on every invocation.

        This is to support the case where a particular step in constructing
        a baked query disqualifies the query from being cacheable, such
        as a variant that relies upon some uncacheable value.

        :param full: if False, only functions added to this
         :class:`.BakedQuery` object subsequent to the spoil step will be
         non-cached; the state of the :class:`.BakedQuery` up until
         this point will be pulled from the cache.   If True, then the
         entire :class:`_query.Query` object is built from scratch each
         time, with all creational functions being called on each
         invocation.

        )�_query_onlyT)r%r2r$�_retrieve_baked_queryr")r�full�_spoil_points   r�spoilzBakedQuery.spoil�sF��(�D�M�M��;�;�=�L��#�#�'7�7�#�&�<�<�=�D�J���
��rc�6�|j|jfzS)a�Return the key that actually goes into the cache dictionary for
        this :class:`.BakedQuery`, taking into account the given
        :class:`.Session`.

        This basically means we also will include the session's query_class,
        as the actual :class:`_query.Query` object is part of what's cached
        and needs to match the type of :class:`_query.Query` that a later
        session will want to use.

        )r$�
_query_clsrFs  r�_effective_keyzBakedQuery._effective_key�s�����'�"4�"4�!6�6�6rc�N�|j�}|j|||��|S)z)Cloning version of _add_lazyload_options.)�
cache_path)r2�_add_lazyload_options)r�options�effective_pathrT�qs     r�_with_lazyload_optionsz!BakedQuery._with_lazyload_options�s'���K�K�M��	�����J��O��rc����d}|s�}�D]T}|js
|js�|j�}|�|jd���A|drJd��||dz
}�V|j	��fd�|j
|�y)	a*Used by per-state lazy loaders to add options to the
        "lazy load" query from a parent query.

        Creates a cache key based on given load path and query options;
        if a repeatable cache key cannot be generated, the query is
        "spoiled" so that it won't use caching.

        rNT)rM�z�loader options with variable bound parameters not supported with baked queries.  Please use new-style select() statements for cached ORM queries.rc�@��|j��j��Sr)�_with_current_pathrV)rXrWrVs ��r�<lambda>z2BakedQuery._add_lazyload_options.<locals>.<lambda>�s���B�a�*�*�>�:�B�B�G�Lr)�_is_legacy_option�_is_compile_state�_generate_cache_keyrOr:�path)rrVrWrT�key�opt�cks ``    rrUz BakedQuery._add_lazyload_options�s�������'�J��C��$�$��(=�(=��,�,�.���:��J�J�D�J�)�!�!�u��'��9��2�a�5�L�C��	
���L��O�O��	
rc��|jj|j|�d�}|�>|j|�}|j	d�|j|j|�<|j	|�Sr)r#�getrR�	_as_query�with_session)rrG�querys   rrLz BakedQuery._retrieve_baked_query�sp����� � ��!4�!4�W�!=�t�D���=��N�N�7�+�E�9>�9K�9K��:�D�L�L��,�,�W�5�6��!�!�'�*�*rc���|j|�}d|_|j�}|jjr ||f|j
|j
|�<||fSr)rhrG�
_statement_20�_compile_options�_bake_okr#rR)rrGrj�	statements    r�_bakezBakedQuery._bake�sf�����w�'����
��'�'�)�	��%�%�.�.���:�D�L�L��,�,�W�5�6�
�i��rc���t|t�r|}nJt|t�r#|j}|�,t	j
d��t
dt|�z��|j|�S)aReturn the :class:`_query.Query` object for use as a subquery.

        This method should be used within the lambda callable being used
        to generate a step of an enclosing :class:`.BakedQuery`.   The
        parameter should normally be the :class:`_query.Query` object that
        is passed to the lambda::

            sub_bq = self.bakery(lambda s: s.query(User.name))
            sub_bq += lambda q: q.filter(User.id == Address.user_id).correlate(Address)

            main_bq = self.bakery(lambda s: s.query(Address))
            main_bq += lambda q: q.filter(sub_bq.to_query(q).exists())

        In the case where the subquery is used in the first callable against
        a :class:`.Session`, the :class:`.Session` is also accepted::

            sub_bq = self.bakery(lambda s: s.query(User.name))
            sub_bq += lambda q: q.filter(User.id == Address.user_id).correlate(Address)

            main_bq = self.bakery(
                lambda s: s.query(Address.id, sub_bq.to_query(q).scalar_subquery())
            )

        :param query_or_session: a :class:`_query.Query` object or a class
         :class:`.Session` object, that is assumed to be within the context
         of an enclosing :class:`.BakedQuery` callable.


         .. versionadded:: 1.3


        z1Given Query needs to be associated with a Sessionz)Query or Session object expected, got %r.)	r8rrrG�sa_exc�
ArgumentError�	TypeError�typerh)r�query_or_sessionrGs   r�to_queryzBakedQuery.to_query�sw��D�&��0�&�G�
�(�%�
0�&�.�.�G����*�*�G����;��'�(�)��
��~�~�g�&�&rc�h�|jd|�}|jddD]
}||�}�|S�Nrr[)r")rrGrj�steps    rrhzBakedQuery._as_query-s:����
�
�1�
�g�&���J�J�q�r�N�D���K�E�#��r)r)��N)Fr)rrrrrr�classmethodr(r2r'r=r@r:r?rHrrOrRrYrUrLrprwrhrrrr!r!9sw��=�<�I���H��H��1��-�	�5�%�)��67��!
�F+� �2/'�brr!c�t�eZdZdZdZd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zy)rEaInvokes a :class:`.BakedQuery` against a :class:`.Session`.

    The :class:`_baked.Result` object is where the actual :class:`.query.Query`
    object gets created, or retrieved from the cache,
    against a target :class:`.Session`, and is then invoked for results.

    ��bqrG�_params�_post_criteriac�<�||_||_i|_g|_yrr~)rrrGs   rrzResult.__init__As����������� ��rc���t|�dk(r|j|d�n#t|�dkDrtjd��|jj|�|S)z@Specify parameters to be replaced into the string SQL statement.r[rzFparams() takes zero or one positional argument, which is a dictionary.)�len�updaterrrsr�)rr�kws   r�paramsz
Result.paramsGs[���t�9��>��I�I�d�1�g��
��Y��]��&�&�)��
�	
�����B���rc�@�|r|jj|�|Sr)r��extend)r�fnss  r�_using_post_criteriazResult._using_post_criteriaTs������&�&�s�+��rc�&�|j|g�S)a�Add a criteria function that will be applied post-cache.

        This adds a function that will be run against the
        :class:`_query.Query` object after it is retrieved from the
        cache.    This currently includes **only** the
        :meth:`_query.Query.params` and :meth:`_query.Query.execution_options`
        methods.

        .. warning::  :meth:`_baked.Result.with_post_criteria`
           functions are applied
           to the :class:`_query.Query`
           object **after** the query's SQL statement
           object has been retrieved from the cache.   Only
           :meth:`_query.Query.params` and
           :meth:`_query.Query.execution_options`
           methods should be used.


        .. versionadded:: 1.2


        )r�)rr6s  r�with_post_criteriazResult.with_post_criteriaYs��.�(�(�"��.�.rc��|jj|j�j|j�}|j
D]
}||�}�|Sr)rrhrGr�r�r�)rrXr6s   rrhzResult._as_queryrsG���G�G���d�l�l�+�2�2�4�<�<�@���%�%�B��1��A�&��rc�4�t|j��Sr)�strrh�rs r�__str__zResult.__str__xs���4�>�>�#�$�$rc�>�|j�j�Sr)�_iter�__iter__r�s rr�zResult.__iter__{s���z�z�|�$�$�&�&rc�R�|j}|jjr|jr|j	�j�S|jj|j|j�d�\}}|�|j|j�\}}|jr|j|j�}n|}|jD]
}||�}�|j}t|j�}|j|j |jd��|jj#|||��}|j$jdd�r|j'�}|j$jdd�r|j)�}|S)N)NN)�_sa_orm_load_options�compiled_cache)�execution_options�is_single_entityF�filtered)rrG�enable_baked_queriesr%rhr�r#rgrRrpr�r�r��dict�_execution_optionsr��load_options�execute�_attributes�scalars�unique)	rrrjrorXr6r�r��results	         rr�zResult._iter~s_��
�W�W���|�|�0�0�B�K�K��>�>�#�)�)�+�+��:�:�>�>����d�l�l�+�\�
���y��=�!�x�x����5��E�9��<�<����T�\�\�*�A��A��%�%�B��1��A�&����� ��!5�!5�6��� � �()���"$�*�*�
�	
����%�%��v�1B�&�
�����!�!�"4�e�<��^�^�%�F����!�!�*�e�4��]�]�_�F��
rc���tjtd���|jj	�fd��}|j|j�j|j�j�S)z�return the 'count'.

        Equivalent to :meth:`_query.Query.count`.

        Note this uses a subquery to ensure an accurate count regardless
        of the structure of the original statement.

        �*c�&��|j��Sr)�_legacy_from_self)rX�cols �rr^zResult.count.<locals>.<lambda>�s���Q�-@�-@��-Er)
r�countr	rr?rHrGr�r��scalar)rrr�s  @rr�zResult.count�sX����j�j���,�-��
�W�W�
"�
"�#E�
F���~�~�d�l�l�+�2�2�4�<�<�@�G�G�I�Irc��	|j�}t|tj�s|S|dS#tj
$rYywxYw)z�Return the first element of the first result or None
        if no rows present.  If multiple rows are returned,
        raises MultipleResultsFound.

        Equivalent to :meth:`_query.Query.scalar`.

        rN)�oner8�collections_abc�Sequence�orm_exc�
NoResultFound)r�rets  rr�z
Result.scalar�sH��	��(�(�*�C��c�?�#;�#;�<��
��q�6�M���$�$�	��	�s�+3�3�A	�A	c��|jjd��}|j|j�j	|j
�j
|j�j�j�S)zRReturn the first row.

        Equivalent to :meth:`_query.Query.first`.

        c�&�|jdd�Sry)�slice)rXs rr^zResult.first.<locals>.<lambda>�s��Q�W�W�Q��]r)
rr?rHrGr�r�r�r�r��first)rrs  rr�zResult.first�s[���W�W�
"�
"�#:�
;���N�N�4�<�<�(�
�V�D�L�L�
!�
!�
!�$�"5�"5�
6�
�U�W�
�U�W�	
rc�>�|j�j�S)zkReturn exactly one result or raise an exception.

        Equivalent to :meth:`_query.Query.one`.

        )r�r�r�s rr�z
Result.one�����z�z�|���!�!rc�>�|j�j�S)z�Return one or zero results, or raise an exception for multiple
        rows.

        Equivalent to :meth:`_query.Query.one_or_none`.

        )r��one_or_noner�s rr�zResult.one_or_none�s���z�z�|�'�'�)�)rc�>�|j�j�S)zKReturn all rows.

        Equivalent to :meth:`_query.Query.all`.

        )r��allr�s rr�z
Result.all�r�rc��|jjd|j�}|j||j�S)z`Retrieve an object based on identity.

        Equivalent to :meth:`_query.Query.get`.

        r)rr"rG�	_get_impl�_load_on_pk_identity)r�identrjs   rrgz
Result.get�s8��!����
�
�a� ����.�����u�d�&?�&?�@�@rc�T����
��|jdjd��j\��
��
���fd�}�j}|j	�}|xj
�fz
c_|j
|td��D���}t��j�D��cic]\}}�
|j|��}	}}t|j�j�jdi|	���}
t|
�}|dkDrt!j"��|r|
dSycc}}w)z6Load the given primary key identity from the database.r�parententityc�v���}|j�}|j�d|_d�
vrMt�	j�
�D��chc]\}}|��|j
��}}}t
j||�}t
j|ddi�f|_	�jD]
}||�}�|Scc}}w)N�
_orm_adaptT)r2�_get_condition�	_order_by�zip�primary_keyrc�sql_util�adapt_criterion_to_null�_deep_annotate�_where_criteriar�)rj�_lcl_get_clauserXr��value�nonesr6�_get_clause�_get_params�mapper�primary_key_identityrs       �����r�setupz*Result._load_on_pk_identity.<locals>.setup�s����)�O�����A�
�����A�K��+�+�'*��*�*�,@�'��'�
��U��}�	 ��$�(�(�'���#+�"B�"B�#�U�#���'�'��,��9M�N�!�A���)�)���q�E��*��H��%s�B5c3�$K�|]}|du���
y�wrr)�.0�elems  r�	<genexpr>z.Result._load_on_pk_identity.<locals>.<genexpr>&s����G�2F�$����2F�s�r[Nr)�_raw_columns�_annotationsr�rr2r$r?r9r�r�rcr0rHrGr�r�r��MultipleResultsFound)rrGrjr�r�r�r�id_valr�r�r��lr�r�r�s`  `        @@@rr�zResult._load_on_pk_identity�s-����#�#�A�&�3�3�N�C��#)�#5�#5� ��[�	�	�@�W�W��
�Y�Y�[��
�
�
�+��'�
�
�
�
��5�G�2F�G�G�
��(+�$�f�&8�&8�(�
�(�#���
��$�(�(�&�0�(�	�
��9�b�n�n�T�\�\�2�9�9�C�F�C�D����K���q�5��.�.�0�0�
��!�9����
s�'D$N)rrrrrrr�r�r�rhr�r�r�r�r�r�r�r�r�rgr�rrrrErE6sb���=�I�!���
/�2�%�'�%�NJ�� 
� "�*�"�A�ArrE)r�collections.abc�abcr��logging�rrrr�ormr��	orm.queryr�orm.sessionr�sqlrr	r��	getLoggerr�logrr!rEr(rrr�<module>r�so���*���� ��!�� �"��g����!��6�6�,z�z�zA�A�H
�	�	�r

Youez - 2016 - github.com/yon3zu
LinuXploit