Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/sqlparse/__pycache__/sql.cpython-312.pyc

199 lines
31 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
f<> inQ<00><00>&<00>dZddlZddlmZddlmZmZGd<05>d<06>ZGd<07>d<08>Z Gd <09>d
e <09>Z
Gd <0B>d e
<EFBFBD>Z Gd <0A>dee
<EFBFBD>Z Gd<0F>de
<EFBFBD>Z Gd<11>de
<EFBFBD>ZGd<13>de
<EFBFBD>ZGd<15>de
<EFBFBD>ZGd<17>de
<EFBFBD>ZGd<19>de
<EFBFBD>ZGd<1B>de
<EFBFBD>ZGd<1D>de
<EFBFBD>ZGd<1F>d e
<EFBFBD>ZGd!<21>d"e
<EFBFBD>ZGd#<23>d$e
<EFBFBD>ZGd%<25>d&e
<EFBFBD>ZGd'<27>d(e
<EFBFBD>ZGd)<29>d*ee
<EFBFBD>ZGd+<2B>d,e
<EFBFBD>ZGd-<2D>d.e
<EFBFBD>ZGd/<2F>d0e
<EFBFBD>ZGd1<64>d2e
<EFBFBD>Zy)3zFThis module contains classes representing syntactical elements of SQL.<2E>N<><01>tokens)<02>imt<6D> remove_quotesc<00><00>eZdZdZd<02>Zd<03>Zy)<05>NameAliasMixinz'Implements get_real_name and get_alias.c<00>r<00>|jtjdf<02><02>\}}|j|d<03><04>S)<05>7Returns the real name (object name) of this identifier.<2E>.<2E><01>mT)<01> real_name)<04> token_next_by<62>T<> Punctuation<6F>_get_first_name)<03>self<6C>dot_idx<64>_s <20>;E:\Project\pygoedge\.venv\Lib\site-packages\sqlparse/sql.py<70> get_real_namezNameAliasMixin.get_real_names:<00><00><1A>'<27>'<27>1<EFBFBD>=<3D>=<3D>#<23>*><3E>'<27>?<3F>
<EFBFBD><07><11><13>#<23>#<23>G<EFBFBD>t<EFBFBD>#<23><<3C><<3C>c<00><00>|jtjdf<02><02>\}}|<02>|j|dzd<05><06>S|jtj<00><07>\}}t |j <00>dkDr|<04>|jd<05> <09>Syy)
<EFBFBD>2Returns the alias for this identifier or ``None``.<2E>ASr N<>T)<01>keywords<64><01>t<><00><01>reverse)rr<00>Keywordr<00>
Whitespace<EFBFBD>lenr)r<00>kw_idx<64>kwr<00>wss r<00> get_aliaszNameAliasMixin.get_aliass<><00><00><1A>'<27>'<27>1<EFBFBD>9<EFBFBD>9<EFBFBD>d<EFBFBD>*;<3B>'<27><<3C>
<EFBFBD><06><02> <0A>><3E><17>'<27>'<27><06><11>
<EFBFBD>T<EFBFBD>'<27>B<> B<><15>"<22>"<22>Q<EFBFBD>\<5C>\<5C>"<22>2<><05><01>2<EFBFBD> <0E>t<EFBFBD>{<7B>{<7B> <1B>a<EFBFBD> <1F>B<EFBFBD>N<EFBFBD><17>'<27>'<27><04>'<27>5<> 5<>%3<> rN)<06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rr)<00>rrrrs<00><00>1<>=<3D> 6rrc<00>R<00>eZdZdZdZd<03>Zd<04>Zd<05>Zd<06>Zd<07>Z d<08>Z
dd <09>Z d
<EFBFBD>Z d <0B>Z d <0C>Zy )<0F>Tokenz<6E>Base class for all other classes in this module.
It represents a single token and has two instance attributes:
``value`` is the unchanged value of the token and ``ttype`` is
the type of the token.
)<08>value<75>ttype<70>parent<6E>
normalized<EFBFBD>
is_keyword<EFBFBD>is_group<75> is_whitespace<63>
is_newlinec<00>V<00>t|<02>}||_||_d|_d|_|t
j v|_|jt
jv|_ |jt
jv|_ |jr|j<00>|_ y||_ y)NF)<0E>strr1r2r3r6rr#r5r$r7<00>Newliner8<00>upperr4)rr2r1s r<00>__init__zToken.__init__2sy<00><00><13>E<EFBFBD>
<EFBFBD><05><1A><04>
<EFBFBD><1A><04>
<EFBFBD><1A><04> <0B><1D><04> <0A><1F>1<EFBFBD>9<EFBFBD>9<EFBFBD>,<2C><04><0F>!<21>Z<EFBFBD>Z<EFBFBD>1<EFBFBD><<3C><<3C>7<><04><1A><1E>*<2A>*<2A><01> <09> <09>1<><04><0F>+/<2F>?<3F>?<3F>%<25>+<2B>+<2B>-<2D><04><0F><05><04>rc<00><00>|jS<00>N<>r1<00>rs r<00>__str__z Token.__str__=s <00><00><13>z<EFBFBD>z<EFBFBD>rc<00><><00>|j<00>}|j<00>}|jd<01>r|jd<01>rdnd}djddt |<00>it <00><00><01>S)N<>'<27>"z"<{cls} {q}{value}{q} at 0x{id:2X}><3E>idr.)<07>_get_repr_name<6D>_get_repr_value<75>
startswith<EFBFBD>endswith<74>formatrF<00>locals)r<00>clsr1<00>qs r<00>__repr__zToken.__repr__Dsi<00><00><12>!<21>!<21>#<23><03><14>$<24>$<24>&<26><05><18>#<23>#<23>C<EFBFBD>(<28>U<EFBFBD>^<5E>^<5E>C<EFBFBD>-@<40>C<EFBFBD>c<EFBFBD><01>:<3A>3<>:<3A>:<3A>%<25><11>$<24>x<EFBFBD>%<25>!<21>8<EFBFBD>%<25> %rc<00>P<00>t|j<00>jd<01>dS)Nr <00><><EFBFBD><EFBFBD><EFBFBD>)r:r2<00>splitrAs rrGzToken._get_repr_nameLs <00><00><12>4<EFBFBD>:<3A>:<3A><EFBFBD>$<24>$<24>S<EFBFBD>)<29>"<22>-<2D>-rc<00>r<00>t|<00>}t|<01>dkDr|dddz}tjdd|<01>S)N<><00>z...z\s+<2B> )r:r%<00>re<72>sub)r<00>raws rrHzToken._get_repr_valueOs8<00><00><11>$<24>i<EFBFBD><03> <0E>s<EFBFBD>8<EFBFBD>a<EFBFBD><<3C><15>b<EFBFBD>q<EFBFBD>'<27>E<EFBFBD>/<2F>C<EFBFBD><11>v<EFBFBD>v<EFBFBD>f<EFBFBD>c<EFBFBD>3<EFBFBD>'<27>'rc#<00>K<00>|<00><01>y<01>w)zResolve subgroups.Nr.rAs r<00>flattenz Token.flattenUs <00><00><><00><12>
<EFBFBD>s<00>c<00>8<00><06>|j|u}|r|<02>|St|t<00>r|f}|rN|jrtj
nd<01><06>fd<02>|D<00>}|D]}|j |j<00>s<01>yy|jr d<05>|D<00>}|j|vS)a,Checks whether the token matches the given arguments.
*ttype* is a token type. If this token doesn't match the given token
type.
*values* is a list of possible values for this token. The values
are OR'ed together so if only one of the values matches ``True``
is returned. Except for keyword tokens the comparison is
case-sensitive. For convenience it's OK to pass in a single string.
If *regex* is ``True`` (default is ``False``) the given values are
treated as regular expressions.
rc3<00>J<00>K<00>|]}tj|<01><02><00><01><00>y<00>wr?)rW<00>compile)<03>.0<EFBFBD>v<>flags <20>r<00> <genexpr>zToken.match.<locals>.<genexpr>os<00><><00><><00>:<3A>6<EFBFBD>a<EFBFBD>b<EFBFBD>j<EFBFBD>j<EFBFBD><11>D<EFBFBD>)<29>6<EFBFBD>s<00> #TFc3<00><K<00>|]}|j<00><00><01><00>y<00>wr?)r<)r_r`s rrbzToken.match.<locals>.<genexpr>ws<00><00><><00>0<><16>A<EFBFBD>a<EFBFBD>g<EFBFBD>g<EFBFBD>i<EFBFBD><16>s<00>)r2<00>
isinstancer:r5rW<00>
IGNORECASE<EFBFBD>searchr4)rr2<00>values<65>regex<65> type_matched<65>patternras @r<00>matchz Token.matchYs<><00><><00><1C>z<EFBFBD>z<EFBFBD>U<EFBFBD>*<2A> <0C><1B>v<EFBFBD>~<7E><1F> <1F> <15>f<EFBFBD>c<EFBFBD> "<22><1C>Y<EFBFBD>F<EFBFBD> <10>$(<28>O<EFBFBD>O<EFBFBD>2<EFBFBD>=<3D>=<3D><11>D<EFBFBD>:<3A>6<EFBFBD>:<3A>F<EFBFBD>!<21><07><1A>><3E>><3E>$<24>/<2F>/<2F>2<><1F>"<22><19> <0F>?<3F>?<3F>0<><16>0<>F<EFBFBD><13><EFBFBD><EFBFBD>&<26>(<28>(rc<00>X<00>|j}|rt||<01>ry|j}|r<01>y)z<>Returns ``True`` if this token is within *group_cls*.
Use this method for example to check if an identifier is within
a function: ``t.within(sql.Function)``.
TF)r3rd)r<00> group_clsr3s r<00>withinz Token.within{s0<00><00> <16><1B><1B><06><14><19>&<26>)<29>,<2C><1B><1B>]<5D>]<5D>F<EFBFBD><15>rc<00> <00>|j|k(S)z<Returns ``True`` if this token is a direct child of *other*.<2E>r3)r<00>others r<00> is_child_ofzToken.is_child_of<6F>s<00><00><13>{<7B>{<7B>e<EFBFBD>#<23>#rc<00>J<00>|j}|r||k(ry|j}|r<01>y)z7Returns ``True`` if *other* is in this tokens ancestry.TFrp)rrqr3s r<00> has_ancestorzToken.has_ancestor<6F>s+<00><00><15><1B><1B><06><14><15><15><EFBFBD><1B><1B>]<5D>]<5D>F<EFBFBD><15>rN<>F)r*r+r,r-<00> __slots__r=rBrOrGrHr[rkrnrrrtr.rrr0r0'sB<00><00><08><<3C>I<EFBFBD> F<01><1A>%<25>.<2E>(<28> <13> )<29>D <15>$<24>rr0c<00><><00><00>eZdZdZdZd<1E>fd<03> Zd<04>Zd<05>Zd<06>Zd<07>Z dd<08>Z
d <09>Z d
<EFBFBD>Z d <0B>Z ed <0C><00>Zd d <0A>Zd!d<0E>Zd"d<0F>Zd<10>Zd<11>Zd!d<12>Zd#d<13>Zd$d<14>Z d!d<15>Zd<16>Zd%d<17>Zd<18>Zd<19>Zd<1A>Zd<1B>Zd<1C>Z d&d<1D>Z <20>xZ!S)'<27> TokenListzwA group of tokens.
It has an additional instance attribute ``tokens`` which holds a
list of child-tokens.
rc<00><><00><01>|xsg|_|jD<00>cgc]}t|d|<00><00><02>c}t<00>|<00> dt |<00><00>d|_ycc}w)Nr3T)r<00>setattr<74>superr=r:r6)rr<00>token<65> __class__s <20>rr=zTokenList.__init__<5F>sM<00><><00><1C>l<EFBFBD><02><04> <0B>59<35>[<5B>[<5B>A<>[<5B>E<EFBFBD><17><15><08>$<24> '<27>[<5B>A<> <0A><07><18><14>s<EFBFBD>4<EFBFBD>y<EFBFBD>)<29><1C><04> <0A><> Bs<00>Ac<00>N<00>djd<02>|j<00>D<00><00>S)N<>c3<00>4K<00>|]}|j<00><01><00>y<00>wr?r@)r_r|s rrbz$TokenList.__str__.<locals>.<genexpr><3E>s<00><00><><00>?<3F><0E>u<EFBFBD>u<EFBFBD>{<7B>{<7B><0E>s<00>)<02>joinr[rAs rrBzTokenList.__str__<5F>s<00><00><11>w<EFBFBD>w<EFBFBD>?<3F><04> <0C> <0C><0E>?<3F>?<3F>?rc<00>,<00>t|j<00>Sr?)<02>iterrrAs r<00>__iter__zTokenList.__iter__<5F>s<00><00><13>D<EFBFBD>K<EFBFBD>K<EFBFBD> <20> rc<00> <00>|j|Sr?r)r<00>items r<00> __getitem__zTokenList.__getitem__<5F>s<00><00><13>{<7B>{<7B>4<EFBFBD> <20> rc<00>,<00>t|<00>jSr?)<02>typer*rAs rrGzTokenList._get_repr_name<6D>s<00><00><13>D<EFBFBD>z<EFBFBD>"<22>"<22>"rc <00><><00>t|j<00>}t|j<00>D]<5D>\}}|j<00>}|j <00>} ||dz
k(}
|
rdnd} | j d<04>r| j d<04>rdnd} tdjd it<00><00><01>|<03><07>|js<01><>|<01>||ks<01><>|
rd nd
} |j||dz||| z<00><00><>y) zPretty-print the object tree.rz`- z|- rDrEz${_pre}{pre}{idx} {cls} {q}{value}{q})<01>fileNz z| r.) r%r<00> enumeraterGrHrIrJ<00>printrKrLr6<00> _pprint_tree)r<00> max_depth<74>depth<74>f<>_pre<72> token_count<6E>idxr|rMr1<00>last<73>prerN<00>
parent_pres rr<>zTokenList._pprint_tree<65>s<><00><00><19>$<24>+<2B>+<2B>&<26> <0B>#<23>D<EFBFBD>K<EFBFBD>K<EFBFBD>0<>J<EFBFBD>C<EFBFBD><15><17>&<26>&<26>(<28>C<EFBFBD><19>)<29>)<29>+<2B>E<EFBFBD><16>;<3B><11>?<3F>+<2B>D<EFBFBD><1F>%<25>U<EFBFBD>C<EFBFBD><1C>'<27>'<27><03>,<2C><15><1E><1E><03>1D<31><03>#<23>A<EFBFBD> <11><1A>8<><19>6<EFBFBD>&<26>"<22>H<EFBFBD>&<26>,-<2D> /<2F><15>~<7E>~<7E>9<EFBFBD>#4<><05> <09>8I<38>&*<2A>U<EFBFBD><05>
<EFBFBD><15>"<22>"<22>9<EFBFBD>e<EFBFBD>a<EFBFBD>i<EFBFBD><11>D<EFBFBD>:<3A><M<>N<>1rc<00><><00>d}|j<00>D],}|t|j<00>z}||cxkr|kr|cS|}<02>.y)z-Returns the token that is on position offset.rN)r[r%r1)r<00>offsetr<74>r|<00>ends r<00>get_token_at_offsetzTokenList.get_token_at_offset<65>sF<00><00><0F><03><19>\<5C>\<5C>^<5E>E<EFBFBD><15><03>E<EFBFBD>K<EFBFBD>K<EFBFBD>(<28>(<28>C<EFBFBD><12>f<EFBFBD>"<22>s<EFBFBD>"<22><1C> <0C>#<23><15>C<EFBFBD> $rc#<00><>K<00>|jD]+}|jr|j<00>Ed{<00><02><02><00>(|<01><01><00>-y7<00> <0C>w)znGenerator yielding ungrouped tokens.
This method is recursively called for all child tokens.
N)rr6r[<00>rr|s rr[zTokenList.flatten<65>s4<00><00><><00>
<1A>[<5B>[<5B>E<EFBFBD><14>~<7E>~<7E> <20>=<3D>=<3D>?<3F>*<2A>*<2A><1B> <0B> !<21>*<2A>s<00>/A<01>><06> Ac#<00>PK<00>|jD]}|js<01>|<01><01><00>y<00>wr?)rr6r<>s r<00> get_sublistszTokenList.get_sublists<74>s <00><00><><00><19>[<5B>[<5B>E<EFBFBD><14>~<7E>~<7E><1B> <0B>!<21>s<00>&<01>&c<00><00>|jSr?rrAs r<00>_groupable_tokenszTokenList._groupable_tokens<6E>s <00><00><13>{<7B>{<7B>rc<00>
<00>|<02>yt|ttf<02>s|f}|r|<03>J<00>t|dz
dd<03>}n#|<03>t |j
<00>}t||<03>}|D](}|j
|}|D]}||<07>s<01> ||fccS<00>*y)znext token that match functionsNr rQ<00>NN)rd<00>list<73>tuple<6C>ranger%r) r<00>funcs<63>startr<74>r"<00>indexesr<73>r|<00>funcs r<00>_token_matchingzTokenList._token_matching<6E>s<><00><00> <10>=<3D><17><19>%<25>$<24><05><1D>/<2F><1A>H<EFBFBD>E<EFBFBD> <12><16>;<3B> <1E>;<3B><1B>E<EFBFBD>A<EFBFBD>I<EFBFBD>r<EFBFBD>2<EFBFBD>.<2E>G<EFBFBD><12>{<7B><19>$<24>+<2B>+<2B>&<26><03><1B>E<EFBFBD>3<EFBFBD>'<27>G<EFBFBD><1A>C<EFBFBD><18>K<EFBFBD>K<EFBFBD><03>$<24>E<EFBFBD><1D><04><17><05>;<3B><1E><05>:<3A>%<25><1E><1B>
rc<00>:<00><01><02><00><02>fd<01>}|j|<03>dS)z<>Returns the first child token.
If *skip_ws* is ``True`` (the default), whitespace
tokens are ignored.
if *skip_cm* is ``True`` (default: ``False``), comments are
ignored too.
c<00>r<00><02><00>xr |jxs$<00>xr t|tjt<00><01> S<00>N)r<00>i<>r7rr<00>Comment<6E><03>tk<74>skip_cm<63>skip_wss <20><>r<00>matcherz&TokenList.token_first.<locals>.matcher<00>8<00><><00> <20>5<>R<EFBFBD>%5<>%5<>I<01>#<23>G<><03>B<EFBFBD>!<21>)<29>)<29>w<EFBFBD>(G<>J<01> Jrr<00>r<>)rr<>r<>r<>s `` r<00> token_firstzTokenList.token_first<73>s!<00><><00> J<01><14>#<23>#<23>G<EFBFBD>,<2C>Q<EFBFBD>/<2F>/rc<00>B<00><01><02><03>|dz }|j<00><01><02>fd<02>||<05>S)Nrc<00> <00><03>t|<00><01><02><03>Sr?)r)r<>r<>r rs <20><><EFBFBD>r<00><lambda>z)TokenList.token_next_by.<locals>.<lambda> s<00><><00>s<EFBFBD>2<EFBFBD>q<EFBFBD>!<21>Q<EFBFBD>/?rr<>)rr<>r rr<>r<>s ``` rrzTokenList.token_next_by s"<00><><00> <0B>q<EFBFBD><08><03><13>#<23>#<23>$?<3F><13>c<EFBFBD>J<>Jrc<00><><00><03>t|ttf<02>s|fn|}|D<00><03>cgc]<00><03>fd<01><08><02> }}|j||<02>Scc}w)Nc<00><00><01><00>|<00> Sr?r.)r<>r<>s <20>rr<>z.TokenList.token_not_matching.<locals>.<lambda>s <00><><00><04>R<EFBFBD><08>Lr)rdr<>r<>r<>)rr<>r<>r<>s `r<00>token_not_matchingzTokenList.token_not_matching sF<00><><00> *<2A>5<EFBFBD>4<EFBFBD><15>-<2D> @<40><15><08>e<EFBFBD><05>5:<3A>;<3B>U<EFBFBD>T<EFBFBD>(<28>U<EFBFBD><05>;<3B><13>#<23>#<23>E<EFBFBD>3<EFBFBD>/<2F>/<2F><><s<00> Ac<00>,<00>|j||<02>dS)Nrr<>)rr<>r<>s r<00>token_matchingzTokenList.token_matchings<00><00><13>#<23>#<23>E<EFBFBD>3<EFBFBD>/<2F><01>2<>2rc<00>,<00>|j|||d<01><02>S)z<>Returns the previous token relative to *idx*.
If *skip_ws* is ``True`` (the default) whitespace tokens are ignored.
If *skip_cm* is ``True`` comments are ignored.
``None`` is returned if there's no previous token.
T)<01>_reverse)<01>
token_next)rr<>r<>r<>s r<00>
token_prevzTokenList.token_prevs<00><00><14><EFBFBD><EFBFBD>s<EFBFBD>G<EFBFBD>W<EFBFBD>t<EFBFBD><EFBFBD>D<>Drc<00>J<00><02><03>|<01>y|dz }<01><03>fd<03>}|j|||<04><04>S)z<>Returns the next token relative to *idx*.
If *skip_ws* is ``True`` (the default) whitespace tokens are ignored.
If *skip_cm* is ``True`` comments are ignored.
``None`` is returned if there's no next token.
r<>rc<00>r<00><02><00>xr |jxs$<00>xr t|tjt<00><01> Sr<>r<>r<>s <20><>rr<>z%TokenList.token_next.<locals>.matcher*r<>rr!r<>)rr<>r<>r<>r<>r<>s `` rr<>zTokenList.token_nexts6<00><><00> <0F>;<3B><1D> <0B>q<EFBFBD><08><03> J<01><14>#<23>#<23>G<EFBFBD>S<EFBFBD>(<28>#<23>C<>Crc<00><><00>t|t<00>r|n|j|<02>}||j|dj |<01>zS)zReturn list index of token.N)rd<00>int<6E> token_indexr<00>index)rr|r<>s rr<>zTokenList.token_index/s><00><00>#<23>E<EFBFBD>3<EFBFBD>/<2F><05>T<EFBFBD>5E<35>5E<35>e<EFBFBD>5L<35><05><14>t<EFBFBD>{<7B>{<7B>5<EFBFBD>6<EFBFBD>*<2A>0<>0<><15>7<>7<>7rc<00>j<00>|}|j|}||z}|r^t||<01>rR|j|dz|}|} | jj|<08>|j|dz|<07>=t|<02>| _n.|j||}||<08>} | g|j|||| _|D] }
| |
_<00> | S)z+Replace tokens by an instance of *grp_cls*.r)rrd<00>extendr:r1r3) r<00>grp_clsr<73>r<><00> include_endr<64><00> start_idx<64>end_idx<64> subtokens<6E>grpr|s r<00> group_tokenszTokenList.group_tokens4s<><00><00><1A> <09><14> <0B> <0B>I<EFBFBD>&<26><05><15> <0B>#<23><07> <12>j<EFBFBD><15><07>0<><1C> <0B> <0B>I<EFBFBD><01>M<EFBFBD>'<27>:<3A>I<EFBFBD><17>C<EFBFBD> <0F>J<EFBFBD>J<EFBFBD> <1D> <1D>i<EFBFBD> (<28><14> <0B> <0B>I<EFBFBD><01>M<EFBFBD>'<27>1<>2<><1B>E<EFBFBD>
<EFBFBD>C<EFBFBD>I<EFBFBD><1C> <0B> <0B>I<EFBFBD>g<EFBFBD>6<>I<EFBFBD><19>)<29>$<24>C<EFBFBD>.1<EFBFBD>U<EFBFBD>D<EFBFBD>K<EFBFBD>K<EFBFBD> <09>'<27> *<2A><1D>C<EFBFBD>J<EFBFBD><1E>E<EFBFBD><1E>E<EFBFBD>L<EFBFBD><1F><13>
rc<00><><00>t|t<00>s|j|<01>}||_|jj ||<02>y)zInserts *token* before *where*.N)rdr<>r<>r3r<00>insert)r<00>wherer|s r<00> insert_beforezTokenList.insert_beforeRs7<00><00><19>%<25><13>%<25><18>$<24>$<24>U<EFBFBD>+<2B>E<EFBFBD><1B><05> <0C> <0C> <0B> <0B><1A><1A>5<EFBFBD>%<25>(rc<00><><00>t|t<00>s|j|<01>}|j||<03><01>\}}||_|<05>|j
j |<02>y|j
j||<02>y)zInserts *token* after *where*.<2E>r<>N)rdr<>r<>r<>r3r<00>appendr<64>)rr<>r|r<><00>nidx<64>next_s r<00> insert_afterzTokenList.insert_afterYsd<00><00><19>%<25><13>%<25><18>$<24>$<24>U<EFBFBD>+<2B>E<EFBFBD><1A>o<EFBFBD>o<EFBFBD>e<EFBFBD>W<EFBFBD>o<EFBFBD>=<3D> <0B><04>e<EFBFBD><1B><05> <0C> <10>=<3D> <10>K<EFBFBD>K<EFBFBD> <1E> <1E>u<EFBFBD> %<25> <10>K<EFBFBD>K<EFBFBD> <1E> <1E>t<EFBFBD>U<EFBFBD> +rc<00>&<00>|j<00>duS)z(Returns ``True`` if an alias is present.N)r)rAs r<00> has_aliaszTokenList.has_aliasds<00><00><13>~<7E>~<7E><1F>t<EFBFBD>+<2B>+rc<00><00>y)rNr.rAs rr)zTokenList.get_aliash<00><00><00>rc<00>F<00>|j<00>xs|j<00>S)aReturns the name of this identifier.
This is either it's alias or it's real name. The returned valued can
be considered as the name under which the object corresponding to
this identifier is known within the current statement.
)r)rrAs r<00>get_namezTokenList.get_namels<00><00><14>~<7E>~<7E><1F>7<>4<EFBFBD>#5<>#5<>#7<>7rc<00><00>y)r
Nr.rAs rrzTokenList.get_real_nameur<>rc<00><><00>|jtjdf<02><02>\}}|j|<01>\}}|<03>t |j
<00>SdS)ztReturn name of the parent object if any.
A parent object is identified by the first occurring dot.
r r N)rrrr<>rr1)rrr<00>prev_s r<00>get_parent_namezTokenList.get_parent_nameysO<00><00>
<1A>'<27>'<27>1<EFBFBD>=<3D>=<3D>#<23>*><3E>'<27>?<3F>
<EFBFBD><07><11><17>?<3F>?<3F>7<EFBFBD>+<2B><08><01>5<EFBFBD>-2<>-><3E>}<7D>U<EFBFBD>[<5B>[<5B>)<29>H<>D<EFBFBD>Hrc<00><><00>|r|j|dn |j}|r t|<05>n|}tjtjtj
j g}|r|jtj<00>|D]c}|j|vrt|j<00>cSt|ttf<02>s<01>?|r|j<00>cS|j!<00>cSy)z/Returns the name of the first token with a nameN)r<00>reversedr<00>Name<6D>Wildcard<72>String<6E>Symbolr<6C>r#r2rr1rd<00>
Identifier<EFBFBD>Functionrr<>)rr<>r"rrr<00>typesr|s rrzTokenList._get_first_name<6D>s<><00><00>'*<2A><14><1B><1B>S<EFBFBD>T<EFBFBD>"<22>t<EFBFBD>{<7B>{<7B><06>%,<2C><18>&<26>!<21>&<26><06><12><16><16><11><1A><1A>Q<EFBFBD>X<EFBFBD>X<EFBFBD>_<EFBFBD>_<EFBFBD>5<><05> <13> <11>L<EFBFBD>L<EFBFBD><11><19><19> #<23><1B>E<EFBFBD><14>{<7B>{<7B>e<EFBFBD>#<23>$<24>U<EFBFBD>[<5B>[<5B>1<>1<><1B>E<EFBFBD>J<EFBFBD><08>#9<>:<3A>09<30>u<EFBFBD>*<2A>*<2A>,<2C>O<>u<EFBFBD>~<7E>~<7E>?O<>O<> rr?)NrNr)rNF)TF)NNNrQN)TFF)r)T)NFFF)"r*r+r,r-rvr=rBr<>r<>rGr<>r<>r[r<><00>propertyr<79>r<>r<>rr<>r<>r<>r<>r<>r<>r<>r<>r<>r)r<>rr<>r<00> __classcell__)r}s@rrxrx<00>s<><00><><00><08> <19>I<EFBFBD><1D> @<01>!<21>!<21>#<23>O<01>$<16> <1C><1C>
<0E><1B><0E><1B><1A>, 0<>K<01>0<>
3<>E<01>D<01> 8<>
=A<01>!<21><13><)<29> ,<2C>,<2C><14>8<><14>I<01>AF<01>"'<27>Prrxc<00><00>eZdZdZd<02>Zy)<04> StatementzRepresents a SQL statement.c<00>.<00>|jd<01><02>}|<01>y|jtjjtjj
fvr |j S|jtjjk(r<>|j|<01>}|<02>z|j|d<01><04>\}}t|ttf<02>rK|j|d<01><04>\}}|<01>3|jtjjk(r |j S|<02><01>zy)aMReturns the type of a statement.
The returned value is a string holding an upper-cased reprint of
the first DML or DDL keyword. If the first token in this group
isn't a DML or DDL keyword "UNKNOWN" is returned.
Whitespaces and comments at the beginning of the statement
are ignored.
T)r<><00>UNKNOWNr<4E>) r<>r2rr#<00>DML<4D>DDLr4<00>CTEr<45>r<>rdr<><00>IdentifierList)rr|<00>tidxs r<00>get_typezStatement.get_type<70>s<><00><00><15> <20> <20><14> <20>.<2E><05> <10>=<3D><1D> <12>[<5B>[<5B>Q<EFBFBD>Y<EFBFBD>Y<EFBFBD>]<5D>]<5D>A<EFBFBD>I<EFBFBD>I<EFBFBD>M<EFBFBD>M<EFBFBD>:<3A> :<3A><18>#<23>#<23> #<23> <12>[<5B>[<5B>A<EFBFBD>I<EFBFBD>I<EFBFBD>M<EFBFBD>M<EFBFBD> )<29><18>#<23>#<23>E<EFBFBD>*<2A>D<EFBFBD><16>"<22>"<22>o<EFBFBD>o<EFBFBD>d<EFBFBD>D<EFBFBD>o<EFBFBD>A<> <0B><04>e<EFBFBD><1D>e<EFBFBD>j<EFBFBD>.<2E>%A<>B<>"&<26>/<2F>/<2F>$<24><04>/<2F>"E<>K<EFBFBD>D<EFBFBD>%<25><1C>(<28> %<25> <0B> <0B>q<EFBFBD>y<EFBFBD>y<EFBFBD>}<7D>}<7D> <<3C>$<24>/<2F>/<2F>/<2F><17>"<22>rN)r*r+r,r-r<>r.rrr<>r<><00>s
<00><00>%<25>"rr<>c<00>(<00>eZdZdZd<02>Zd<03>Zd<04>Zd<05>Zy)r<>zNRepresents an identifier.
Identifiers may have aliases or typecasts.
c<00>P<00>|jtj<00><01>\}}|duS)z7Return ``True`` if this identifier contains a wildcard.rN)rrr<>)rrr|s r<00> is_wildcardzIdentifier.is_wildcard<72>s(<00><00><17>%<25>%<25><01>
<EFBFBD>
<EFBFBD>%<25>3<><08><01>5<EFBFBD><14>D<EFBFBD> <20> rc<00><><00>|jtjdf<02><02>\}}|j|d<03><04>\}}|r |jSdS)z<Returns the typecast or ``None`` of this object as a string.z::r Fr<46>N)rrrr<>r1)r<00>midx<64>markerr<72>r<>s r<00> get_typecastzIdentifier.get_typecast<73>sI<00><00><1B>)<29>)<29>Q<EFBFBD>]<5D>]<5D>D<EFBFBD>,A<>)<29>B<> <0C><04>f<EFBFBD><1A>o<EFBFBD>o<EFBFBD>d<EFBFBD>E<EFBFBD>o<EFBFBD>:<3A> <0B><04>e<EFBFBD>#<23>u<EFBFBD>{<7B>{<7B>-<2D><14>-rc<00>|<00>|jtjj<00><01>\}}|r |jSdS)z5Returns the ordering or ``None`` as uppercase string.rN)rrr#<00>Orderr4)rr<00>orderings r<00> get_orderingzIdentifier.get_ordering<6E>s4<00><00><1A>(<28>(<28>1<EFBFBD>9<EFBFBD>9<EFBFBD>?<3F>?<3F>(<28>;<3B> <0B><01>8<EFBFBD>&.<2E>x<EFBFBD>"<22>"<22>8<>D<EFBFBD>8rc#<00>rK<00>|jD]$}t|t<00>s<01>|jdd<00><01><00>&y<03>w)z(Returns an iterator of index token listsrrQN)rrd<00>SquareBracketsr<73>s r<00>get_array_indiceszIdentifier.get_array_indices<65>s1<00><00><><00><1A>[<5B>[<5B>E<EFBFBD><19>%<25><1E>0<><1B>l<EFBFBD>l<EFBFBD>1<EFBFBD>R<EFBFBD>(<28>(<28>!<21>s<00> 7<01>7N)r*r+r,r-rrrr r.rrr<>r<><00>s<00><00><08>
!<21>
.<2E> 9<>
)rr<>c<00><00>eZdZdZd<02>Zy)r<>z.A list of :class:`~sqlparse.sql.Identifier`'s.c#<00><>K<00>|jD]4}|jr<01>|jtjd<01>r<01>1|<01><01><00>6y<02>w)zkReturns the identifiers.
Whitespaces and punctuations are not included in this generator.
<20>,N)rr7rkrrr<>s r<00>get_identifierszIdentifierList.get_identifiers<72>s5<00><00><><00>
<1A>[<5B>[<5B>E<EFBFBD><19>'<27>'<27>5<EFBFBD>;<3B>;<3B>q<EFBFBD>}<7D>}<7D>c<EFBFBD>+J<><1B> <0B>!<21>s<00>A<01> A<01>AN)r*r+r,r-rr.rrr<>r<><00>s
<00><00>9<>rr<>c<00><><00>eZdZdZej
j dfejdfgZejjdfZ ejdfZ y)<05> TypedLiteralzEA typed literal, such as "date '2001-09-28'" or "interval '2 hours'".N<> TIMESTAMP)<06>DAY<41>HOUR<55>MINUTE<54>MONTH<54>SECOND<4E>YEAR) r*r+r,r-rr<><00>Builtinr#<00>M_OPENr<4E><00>Single<6C>M_CLOSE<53>M_EXTENDr.rrrr<00>sF<00><00>O<><10>v<EFBFBD>v<EFBFBD>~<7E>~<7E>t<EFBFBD>$<24>q<EFBFBD>y<EFBFBD>y<EFBFBD>+<2B>&><3E> ?<3F>F<EFBFBD><0F>h<EFBFBD>h<EFBFBD>o<EFBFBD>o<EFBFBD>t<EFBFBD>#<23>G<EFBFBD><10>y<EFBFBD>y<EFBFBD>N<>N<>Hrrc<00>X<00>eZdZdZej
dfZej
dfZed<04><00>Z y)<06> ParenthesiszTokens between parenthesis.<2E>(<28>)c<00> <00>|jddS<00>NrrQrrAs rr<>zParenthesis._groupable_tokens<6E><00><00><00><13>{<7B>{<7B>1<EFBFBD>R<EFBFBD> <20> rN<>
r*r+r,r-rrrrr<>r<>r.rrrr<00>s3<00><00>%<25> <0E>]<5D>]<5D>C<EFBFBD> <1F>F<EFBFBD><0F>m<EFBFBD>m<EFBFBD>S<EFBFBD> <20>G<EFBFBD> <0A>!<21><0E>!rrc<00>X<00>eZdZdZej
dfZej
dfZed<04><00>Z y)r
zTokens between square brackets<74>[<5B>]c<00> <00>|jddSr#rrAs rr<>z SquareBrackets._groupable_tokens<6E>r$rNr%r.rrr
r
<00>s3<00><00>(<28> <0E>]<5D>]<5D>C<EFBFBD> <1F>F<EFBFBD><0F>m<EFBFBD>m<EFBFBD>S<EFBFBD> <20>G<EFBFBD> <0A>!<21><0E>!rr
c<00><00>eZdZdZy)<03>
Assignmentz An assignment like 'var := val;'N<>r*r+r,r-r.rrr+r+s<00><00>*rr+c<00>H<00>eZdZdZej
dfZej
dfZy)<05>Ifz7An 'if' clause with possible 'else if' or 'else' parts.<2E>IFzEND IFN<46>r*r+r,r-rr#rrr.rrr.r.s <00><00>A<> <0E>Y<EFBFBD>Y<EFBFBD><04>_<EFBFBD>F<EFBFBD><0F>i<EFBFBD>i<EFBFBD><18>!<21>Grr.c<00>H<00>eZdZdZej
dfZej
dfZy)<05>Forz A 'FOR' loop.)<02>FOR<4F>FOREACHzEND LOOPNr0r.rrr2r2 s"<00><00><17> <0E>Y<EFBFBD>Y<EFBFBD>*<2A> *<2A>F<EFBFBD><0F>i<EFBFBD>i<EFBFBD><1A>#<23>Grr2c<00>0<00>eZdZdZed<02><00>Zed<03><00>Zy)<05>
Comparisonz/A comparison used for example in WHERE clauses.c<00> <00>|jdS<00>NrrrAs r<00>leftzComparison.lefts<00><00><13>{<7B>{<7B>1<EFBFBD>~<7E>rc<00> <00>|jdS)NrQrrAs r<00>rightzComparison.rights<00><00><13>{<7B>{<7B>2<EFBFBD><EFBFBD>rN)r*r+r,r-r<>r9r;r.rrr6r6s+<00><00>9<> <0A><1E><0E><1E><0E><1F><0E>rr6c<00><00>eZdZdZd<02>Zy)r<>z
A comment.c<00><><00>|jxr4|jdjtjjk(Sr8)rr2rr<><00> MultilinerAs r<00> is_multilinezComment.is_multiline"s.<00><00><13>{<7B>{<7B>J<>t<EFBFBD>{<7B>{<7B>1<EFBFBD>~<7E>3<>3<>q<EFBFBD>y<EFBFBD>y<EFBFBD>7J<37>7J<37>J<>JrN)r*r+r,r-r?r.rrr<>r<>s <00><00><14>Krr<>c<00>H<00>eZdZdZej
dfZej
dfZy)<05>WherezA WHERE clause.<2E>WHERE) <09>ORDER BYzGROUP BY<42>LIMIT<49>UNIONz UNION ALL<4C>EXCEPT<50>HAVING<4E> RETURNING<4E>INTONr0r.rrrArA&s&<00><00><19> <0E>Y<EFBFBD>Y<EFBFBD><07> <1F>F<EFBFBD><0F>i<EFBFBD>i<EFBFBD>'<27>'<27>GrrAc<00>,<00>eZdZdZej
dfZy)<04>OverzAn OVER clause.<2E>OVERN)r*r+r,r-rr#rr.rrrKrK.s<00><00><19> <0E>Y<EFBFBD>Y<EFBFBD><06> <1E>FrrKc<00>H<00>eZdZdZej
dfZej
dfZy)<05>HavingzA HAVING clause.rG)rCrDNr0r.rrrNrN3s"<00><00><1A> <0E>Y<EFBFBD>Y<EFBFBD><08> <20>F<EFBFBD><0F>i<EFBFBD>i<EFBFBD>.<2E>.<2E>GrrNc<00>P<00>eZdZdZej
dfZej
dfZdd<04>Zy)<07>CasezAA CASE statement with one or more WHEN and possibly an ELSE part.<2E>CASE<53>ENDc<00><><00>d}d}g}|}|jD<00>]G}|jtjd<03>r<01>%|r|jtj
vr<01>D|jtjd<04>r|j ggf<02>|}n{|jtjd<05>r|}nX|jtjd<06>r|j dgf<02>|}n"|jtjd<08>rd}|r|s|j ggf<02>||k(r|d d
j |<06><00><01>*||k(s<02><01>1|d dj |<06><00><01>J|S) zeReturns a list of 2-tuples (condition, value).
If an ELSE exists condition is None.
rr rQ<00>WHEN<45>THEN<45>ELSENrRrQr)rrkrr#r2r$r<>)rr<><00> CONDITION<4F>VALUE<55>ret<65>moder|s r<00> get_caseszCase.get_cases>s(<00><00>
<16> <09><11><05><10><03><18><04><19>[<5B>[<5B>E<EFBFBD><14>{<7B>{<7B>1<EFBFBD>9<EFBFBD>9<EFBFBD>f<EFBFBD>-<2D><18><18>U<EFBFBD>[<5B>[<5B>A<EFBFBD>L<EFBFBD>L<EFBFBD>8<><18><16><1B><1B>Q<EFBFBD>Y<EFBFBD>Y<EFBFBD><06>/<2F><13>
<EFBFBD>
<EFBFBD>B<EFBFBD><02>8<EFBFBD>$<24> <20><04><16><1B><1B>Q<EFBFBD>Y<EFBFBD>Y<EFBFBD><06>/<2F><1C><04><16><1B><1B>Q<EFBFBD>Y<EFBFBD>Y<EFBFBD><06>/<2F><13>
<EFBFBD>
<EFBFBD>D<EFBFBD>"<22>:<3A>&<26><1C><04><16><1B><1B>Q<EFBFBD>Y<EFBFBD>Y<EFBFBD><05>.<2E><1B><04><14>C<EFBFBD><13>
<EFBFBD>
<EFBFBD>B<EFBFBD><02>8<EFBFBD>$<24><14>y<EFBFBD> <20><13>B<EFBFBD><07><01>
<EFBFBD>!<21>!<21>%<25>(<28><15><15><1D><13>B<EFBFBD><07><01>
<EFBFBD>!<21>!<21>%<25>(<28>?!<21>D<13>
rNru) r*r+r,r-rr#rrr[r.rrrPrP9s&<00><00>K<> <0E>Y<EFBFBD>Y<EFBFBD><06> <1E>F<EFBFBD><0F>i<EFBFBD>i<EFBFBD><15><1E>G<EFBFBD>-rrPc<00><00>eZdZdZd<02>Zd<03>Zy)r<>zA function or procedure call.c<00><00>|jt<00><01>d}g}|jD]a}t|t<00>r|j <00>cSt |tttftj<00><03>s<01>Q|j|<03><00>c|S)zReturn a list of parameters.<2E>r<>r)r<>r) rrrrdr<>rrr<>r<>rr<00>Literalr<6C>)r<00> parenthesis<69>resultr|s r<00>get_parameterszFunction.get_parametersqsu<00><00><1A>(<28>(<28>;<3B>(<28>7<><01>:<3A> <0B><13><06> <20>'<27>'<27>E<EFBFBD><19>%<25><1E>0<><1C>,<2C>,<2C>.<2E>.<2E><14>U<EFBFBD>x<EFBFBD><1A>\<5C>B<><18>y<EFBFBD>y<EFBFBD>"<22><16> <0A> <0A>e<EFBFBD>$<24> (<28> <16> rc<00>X<00>|jt<00><01>}|sy|djdS)zReturn the window if it exists.r^NrrQ)rrKr)r<00> over_clauses r<00>
get_windowzFunction.get_window}s0<00><00><1A>(<28>(<28>4<EFBFBD>(<28>0<> <0B><1A><17><1A>1<EFBFBD>~<7E>$<24>$<24>R<EFBFBD>(<28>(rN)r*r+r,r-rbrer.rrr<>r<>ns<00><00>'<27>
<16>)rr<>c<00>H<00>eZdZdZej
dfZej
dfZy)<05>BeginzA BEGIN/END block.<2E>BEGINrRNr0r.rrrgrg<00>s!<00><00><1C> <0E>Y<EFBFBD>Y<EFBFBD><07> <1F>F<EFBFBD><0F>i<EFBFBD>i<EFBFBD><15><1E>Grrgc<00><00>eZdZdZy)<03> OperationzGrouping of operationsNr,r.rrrjrj<00>s<00><00> rrjc<00><00>eZdZdZy)<03>ValueszGrouping of valuesNr,r.rrrlrl<00>s<00><00>rrlc<00><00>eZdZdZy)<03>CommandzGrouping of CLI commands.Nr,r.rrrnrn<00>s<00><00>#rrn)r-rW<00>sqlparserr<00>sqlparse.utilsrrrr0rxr<>r<>r<>rrr
r+r.r2r6r<>rArKrNrPr<>rgrjrlrnr.rr<00><module>rqs6<00><01>M<01> <09> <20>-<2D>6<>6<>.l<15>l<15>^{P<01><05>{P<01>|%<19> <09>%<19>P)<29><1E><19>)<29>>
<1C>Y<EFBFBD>
<1C>O<01>9<EFBFBD>O<01>!<21>)<29>!<21>!<21>Y<EFBFBD>!<21>+<2B><19>+<2B>"<22><19>"<22> $<24>)<29>$<24> <1F><19> <1F>K<01>i<EFBFBD>K<01>'<27>I<EFBFBD>'<27><1F>9<EFBFBD><1F>
/<2F>Y<EFBFBD>/<2F> 2<13>9<EFBFBD>2<13>j)<29>~<7E>y<EFBFBD>)<29>.<1F>I<EFBFBD><1F> !<21> <09>!<21><1D>Y<EFBFBD><1D>$<24>i<EFBFBD>$r