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 : 172.67.177.218  /  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/cloudlinux/venv/lib64/python3.11/site-packages/psycopg2/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cloudlinux/venv/lib64/python3.11/site-packages/psycopg2/__pycache__/sql.cpython-311.pyc
�

�h�9���dZddlZddlmZej��ZGd�d��ZGd�de��ZGd�d	e��Z	Gd
�de��Z
Gd�d
e��ZGd�de��Ze	d��Z
e	d��ZdS)zSQL composition utility module
�N)�
extensionsc�<�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	S)
�
Composablea6
    Abstract base class for objects that can be used to compose an SQL string.

    `!Composable` objects can be passed directly to `~cursor.execute()`,
    `~cursor.executemany()`, `~cursor.copy_expert()` in place of the query
    string.

    `!Composable` objects can be joined using the ``+`` operator: the result
    will be a `Composed` instance containing the objects joined. The operator
    ``*`` is also supported with an integer argument: the result is a
    `!Composed` instance containing the left argument repeated as many times as
    requested.
    c��||_dS�N��_wrapped)�self�wrappeds  �_/builddir/build/BUILD/cloudlinux-venv-1.0.8/venv/lib64/python3.11/site-packages/psycopg2/sql.py�__init__zComposable.__init__1s
����
�
�
�c�0�|jj�d|j�d�S)N�(�))�	__class__�__name__r	�r
s r�__repr__zComposable.__repr__4s ���.�)�>�>�D�M�>�>�>�>rc��t�)aj
        Return the string value of the object.

        :param context: the context to evaluate the string into.
        :type context: `connection` or `cursor`

        The method is automatically invoked by `~cursor.execute()`,
        `~cursor.executemany()`, `~cursor.copy_expert()` if a `!Composable` is
        passed instead of the query string.
        )�NotImplementedError�r
�contexts  r�	as_stringzComposable.as_string7s
��"�!rc���t|t��rt|g��|zSt|t��r!t|g��t|g��zStSr)�
isinstance�Composedr�NotImplemented�r
�others  r�__add__zComposable.__add__Ds`���e�X�&�&�	,��T�F�#�#�e�+�+��e�Z�(�(�	"��T�F�#�#�h��w�&7�&7�7�7�!�!rc�(�t|g|z��Sr)r)r
�ns  r�__mul__zComposable.__mul__Ls������
�#�#�#rc�^�t|��t|��uo|j|jkSr)�typer	rs  r�__eq__zComposable.__eq__Os'���D�z�z�T�%�[�[�(�L�T�]�e�n�-L�Lrc�.�|�|��Sr)r'rs  r�__ne__zComposable.__ne__Rs���;�;�u�%�%�%�%rN)r�
__module__�__qualname__�__doc__r
rrr!r$r'r)�rrrr#s��������� � � �?�?�?�"�"�"�"�"�"�$�$�$�M�M�M�&�&�&�&�&rrc�P��eZdZdZ�fd�Zed���Zd�Zd�Zd�Z	d�Z
�xZS)ra
    A `Composable` object made of a sequence of `!Composable`.

    The object is usually created using `!Composable` operators and methods.
    However it is possible to create a `!Composed` directly specifying a
    sequence of `!Composable` as arguments.

    Example::

        >>> comp = sql.Composed(
        ...     [sql.SQL("insert into "), sql.Identifier("table")])
        >>> print(comp.as_string(conn))
        insert into "table"

    `!Composed` objects are iterable (so they can be used in `SQL.join` for
    instance).
    c����g}|D]?}t|t��std|�d����|�|���@t	���|��dS)Nz*Composed elements must be Composable, got z instead)rr�	TypeError�append�superr
)r
�seqr�irs    �rr
zComposed.__init__hs�������	�	�A��a��,�,�
P��N��N�N�N�P�P�P��N�N�1�����
������!�!�!�!�!rc�*�t|j��S)z+The list of the content of the `!Composed`.)�listr	rs rr3zComposed.seqrs���D�M�"�"�"rc��g}|jD]*}|�|�|�����+d�|��S)N�)r	r1r�join)r
r�rvr4s    rrzComposed.as_stringwsI��
����	,�	,�A��I�I�a�k�k�'�*�*�+�+�+�+��w�w�r�{�{�rc�*�t|j��Sr)�iterr	rs r�__iter__zComposed.__iter__}s���D�M�"�"�"rc���t|t��rt|j|jz��St|t��rt|j|gz��StSr)rrr	rrrs  rr!zComposed.__add__�sZ���e�X�&�&�	<��D�M�E�N�:�;�;�;��e�Z�(�(�	"��D�M�U�G�3�4�4�4�!�!rc��t|t��rt|��}n$t|t��std���|�|��S)a|
        Return a new `!Composed` interposing the *joiner* with the `!Composed` items.

        The *joiner* must be a `SQL` or a string which will be interpreted as
        an `SQL`.

        Example::

            >>> fields = sql.Identifier('foo') + sql.Identifier('bar')  # a Composed
            >>> print(fields.join(', ').as_string(conn))
            "foo", "bar"

        z3Composed.join() argument must be a string or an SQL)r�str�SQLr0r9)r
�joiners  rr9z
Composed.join�sc���f�c�"�"�	G���[�[�F�F��F�C�(�(�	G��E�G�G�
G��{�{�4� � � r)rr*r+r,r
�propertyr3rr=r!r9�
__classcell__�rs@rrrVs����������""�"�"�"�"��#�#��X�#����#�#�#�"�"�"�!�!�!�!�!�!�!rrc�J��eZdZdZ�fd�Zed���Zd�Zd�Zd�Z	�xZ
S)rAaA
    A `Composable` representing a snippet of SQL statement.

    `!SQL` exposes `join()` and `format()` methods useful to create a template
    where to merge variable parts of a query (for instance field or table
    names).

    The *string* doesn't undergo any form of escaping, so it is not suitable to
    represent variable identifiers or values: you should only use it to pass
    constant strings representing templates or snippets of SQL statements; use
    other objects such as `Identifier` or `Literal` to represent variable
    parts.

    Example::

        >>> query = sql.SQL("select {0} from {1}").format(
        ...    sql.SQL(', ').join([sql.Identifier('foo'), sql.Identifier('bar')]),
        ...    sql.Identifier('table'))
        >>> print(query.as_string(conn))
        select "foo", "bar" from "table"
    c���t|t��std���t���|��dS)NzSQL values must be strings)rr@r0r2r
)r
�stringrs  �rr
zSQL.__init__�sB����&�#�&�&�	:��8�9�9�9�
������ � � � � rc��|jS)z(The string wrapped by the `!SQL` object.rrs rrHz
SQL.string�����}�rc��|jSrrrs  rrz
SQL.as_string�s
���}�rc�F�g}d}t�|j��D]�\}}}}|rtd���|rtd���|r"|�t|����|��P|���r<|rtd���|�|t|����d}��|s2|�td���|�||��|dz
}��|�||����t|��S)a^
        Merge `Composable` objects into a template.

        :param `Composable` args: parameters to replace to numbered
            (``{0}``, ``{1}``) or auto-numbered (``{}``) placeholders
        :param `Composable` kwargs: parameters to replace to named (``{name}``)
            placeholders
        :return: the union of the `!SQL` string with placeholders replaced
        :rtype: `Composed`

        The method is similar to the Python `str.format()` method: the string
        template supports auto-numbered (``{}``), numbered (``{0}``,
        ``{1}``...), and named placeholders (``{name}``), with positional
        arguments replacing the numbered placeholders and keywords replacing
        the named ones. However placeholder modifiers (``{0!r}``, ``{0:<10}``)
        are not supported. Only `!Composable` objects can be passed to the
        template.

        Example::

            >>> print(sql.SQL("select * from {} where {} = %s")
            ...     .format(sql.Identifier('people'), sql.Identifier('id'))
            ...     .as_string(conn))
            select * from "people" where "id" = %s

            >>> print(sql.SQL("select * from {tbl} where {pkey} = %s")
            ...     .format(tbl=sql.Identifier('people'), pkey=sql.Identifier('id'))
            ...     .as_string(conn))
            select * from "people" where "id" = %s

        rz(no format specification supported by SQLz%no format conversion supported by SQLNz6cannot switch from automatic field numbering to manualz6cannot switch from manual field numbering to automatic�)	�
_formatter�parser	�
ValueErrorr1rA�isdigit�intr)	r
�args�kwargsr:�autonum�pre�name�spec�convs	         r�formatz
SQL.format�sP��@����%/�%5�%5�d�m�%D�%D�	(�	(�!�C��t�T��
M� �!K�L�L�L��
J� �!H�I�I�I��
$��	�	�#�c�(�(�#�#�#��|���|�|�~�~�
(��R�$�P�R�R�R��	�	�$�s�4�y�y�/�*�*�*�����
(��?�$�P�R�R�R��	�	�$�w�-�(�(�(��1�����	�	�&��,�'�'�'�'���|�|�rc��g}t|��}	|�t|����|D],}|�|��|�|���-n#t$rYnwxYwt	|��S)a
        Join a sequence of `Composable`.

        :param seq: the elements to join.
        :type seq: iterable of `!Composable`

        Use the `!SQL` object's *string* to separate the elements in *seq*.
        Note that `Composed` objects are iterable too, so they can be used as
        argument for this method.

        Example::

            >>> snip = sql.SQL(', ').join(
            ...     sql.Identifier(n) for n in ['foo', 'bar', 'baz'])
            >>> print(snip.as_string(conn))
            "foo", "bar", "baz"
        )r<r1�next�
StopIterationr)r
r3r:�itr4s     rr9zSQL.joins���$��
�#�Y�Y��	��I�I�d�2�h�h�����
�
���	�	�$�����	�	�!�����
���	�	�	��D�	������|�|�s�"A%�%
A2�1A2)rr*r+r,r
rCrHrrZr9rDrEs@rrArA�s����������*!�!�!�!�!�
����X�����>�>�>�@������rrAc�Z��eZdZdZ�fd�Zed���Zed���Zd�Zd�Z	�xZ
S)�
Identifiera*
    A `Composable` representing an SQL identifier or a dot-separated sequence.

    Identifiers usually represent names of database objects, such as tables or
    fields. PostgreSQL identifiers follow `different rules`__ than SQL string
    literals for escaping (e.g. they use double quotes instead of single).

    .. __: https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#         SQL-SYNTAX-IDENTIFIERS

    Example::

        >>> t1 = sql.Identifier("foo")
        >>> t2 = sql.Identifier("ba'r")
        >>> t3 = sql.Identifier('ba"z')
        >>> print(sql.SQL(', ').join([t1, t2, t3]).as_string(conn))
        "foo", "ba'r", "ba""z"

    Multiple strings can be passed to the object to represent a qualified name,
    i.e. a dot-separated sequence of identifiers.

    Example::

        >>> query = sql.SQL("select {} from {}").format(
        ...     sql.Identifier("table", "field"),
        ...     sql.Identifier("schema", "table"))
        >>> print(query.as_string(conn))
        select "table"."field" from "schema"."table"

    c���|std���|D]&}t|t��std����'t���|��dS)NzIdentifier cannot be emptyz$SQL identifier parts must be strings)r0rr@r2r
)r
�strings�srs   �rr
zIdentifier.__init__Ass����	:��8�9�9�9��	H�	H�A��a��%�%�
H�� F�G�G�G�
H�	������!�!�!�!�!rc��|jS)z5A tuple with the strings wrapped by the `Identifier`.rrs rrbzIdentifier.stringsKrJrc�j�t|j��dkr
|jdStd���)z0The string wrapped by the `Identifier`.
        rMrz2the Identifier wraps more than one than one string)�lenr	�AttributeErrorrs rrHzIdentifier.stringPs>���t�}����"�"��=��#�#� �D�F�F�
Frc�|�|jj�dd�tt|j�����d�S)Nrz, r)rrr9�map�reprr	rs rrzIdentifier.__repr__Zs6���.�)�R�R�D�I�I�c�$��
�6N�6N�,O�,O�R�R�R�Rrc�P��d��fd�|jD����S)N�.c3�B�K�|]}tj|���V��dSr)�ext�quote_ident)�.0rcrs  �r�	<genexpr>z'Identifier.as_string.<locals>.<genexpr>^s/�����K�K�����7�3�3�K�K�K�K�K�Kr)r9r	rs `rrzIdentifier.as_string]s,����x�x�K�K�K�K�T�]�K�K�K�K�K�Kr)rr*r+r,r
rCrbrHrrrDrEs@rr`r`"s����������<"�"�"�"�"�����X���F�F��X�F�S�S�S�L�L�L�L�L�L�Lrr`c�.�eZdZdZed���Zd�ZdS)�Literala�
    A `Composable` representing an SQL value to include in a query.

    Usually you will want to include placeholders in the query and pass values
    as `~cursor.execute()` arguments. If however you really really need to
    include a literal value in the query you can use this object.

    The string returned by `!as_string()` follows the normal :ref:`adaptation
    rules <python-types-adaptation>` for Python objects.

    Example::

        >>> s1 = sql.Literal("foo")
        >>> s2 = sql.Literal("ba'r")
        >>> s3 = sql.Literal(42)
        >>> print(sql.SQL(', ').join([s1, s2, s3]).as_string(conn))
        'foo', 'ba''r', 42

    c��|jS)z%The object wrapped by the `!Literal`.rrs rrzLiteral.wrappedurJrc���t|tj��r|}n1t|tj��r|j}nt	d���tj|j��}t|d��r|�|��|�	��}t|t��r*|�tj|j
��}|S)Nz(context must be a connection or a cursor�prepare)rrn�
connection�cursorr0�adaptr	�hasattrrv�	getquoted�bytes�decode�	encodings�encoding)r
r�conn�ar:s     rrzLiteral.as_stringzs����g�s�~�.�.�	H��D�D�
����
,�
,�	H��%�D�D��F�G�G�G��I�d�m�$�$���1�i� � �	�
�I�I�d�O�O�O�
�[�[�]�]���b�%� � �	9����3�=���7�8�8�B��	rN)rr*r+r,rCrrr-rrrsrsasH��������&����X������rrsc�F��eZdZdZd�fd�	Zed���Zd�Zd�Z�xZ	S)�Placeholdera�A `Composable` representing a placeholder for query parameters.

    If the name is specified, generate a named placeholder (e.g. ``%(name)s``),
    otherwise generate a positional placeholder (e.g. ``%s``).

    The object is useful to generate SQL queries with a variable number of
    arguments.

    Examples::

        >>> names = ['foo', 'bar', 'baz']

        >>> q1 = sql.SQL("insert into table ({}) values ({})").format(
        ...     sql.SQL(', ').join(map(sql.Identifier, names)),
        ...     sql.SQL(', ').join(sql.Placeholder() * len(names)))
        >>> print(q1.as_string(conn))
        insert into table ("foo", "bar", "baz") values (%s, %s, %s)

        >>> q2 = sql.SQL("insert into table ({}) values ({})").format(
        ...     sql.SQL(', ').join(map(sql.Identifier, names)),
        ...     sql.SQL(', ').join(map(sql.Placeholder, names)))
        >>> print(q2.as_string(conn))
        insert into table ("foo", "bar", "baz") values (%(foo)s, %(bar)s, %(baz)s)

    Nc����t|t��rd|vrtd|�����n|�td|�����t	���|��dS)Nrzinvalid name: z%expected string or None as name, got )rr@rPr0r2r
)r
rWrs  �rr
zPlaceholder.__init__�sx����d�C� � �	N��d�{�{� �!:�$�!:�!:�;�;�;���
��L�D�L�L�M�M�M�
����������rc��|jS)zThe name of the `!Placeholder`.rrs rrWzPlaceholder.name�rJrc�\�|j�|jj�d�S|jj�d|j�d�S)Nz()rr)r	rrrs rrzPlaceholder.__repr__�s<���=� ��n�-�1�1�1�1��n�-�B�B��
�B�B�B�Brc�*�|j�d|j�d�SdS)Nz%(z)sz%srrs  rrzPlaceholder.as_string�s"���=�$�)��
�)�)�)�)��4rr)
rr*r+r,r
rCrWrrrDrEs@rr�r��s����������4����������X��C�C�C�������rr��NULL�DEFAULT)r,rH�psycopg2rrn�	FormatterrNrrrAr`rsr�r�r�r-rr�<module>r�sv����4�
�
�
�&�&�&�&�&�&��V�
�
�
�
�0&�0&�0&�0&�0&�0&�0&�0&�fF!�F!�F!�F!�F!�z�F!�F!�F!�R@�@�@�@�@�*�@�@�@�F<L�<L�<L�<L�<L��<L�<L�<L�~*�*�*�*�*�j�*�*�*�Z4�4�4�4�4�*�4�4�4�p�s�6�{�{��

�#�i�.�.���r

Youez - 2016 - github.com/yon3zu
LinuXploit