Files
old-saburly-wagtail-web/env/lib/python3.10/site-packages/sqlparse/__pycache__/lexer.cpython-310.pyc

62 lines
4.5 KiB
Plaintext
Raw Normal View History

2024-08-27 20:33:44 +02:00
o
<00><><EFBFBD>fg<00>@s\dZddlZddlmZddlmZddlmZmZddl m
Z
Gdd<08>d<08>Z d d d
<EFBFBD>Z dS) z SQL Lexer<65>N)<01>Lock)<01>
TextIOBase)<02>tokens<6E>keywords)<01>consumec@sXeZdZdZdZe<05>Zedd<04><00>Zdd<06>Z dd<08>Z
d d
<EFBFBD>Z d d <0C>Z d d<0E>Z ddd<10>ZdS)<12>LexerzrThe Lexer supports configurable syntax.
To add support for additional keywords, use the `add_keywords` method.NcCs^|j<00>!|jdur|<00>|_|j<01><02>Wd<00>|jSWd<00>|jS1s'wY|jS)zRReturns the lexer instance used internally
by the sqlparse core functions.N)<03>_lock<63>_default_instance<63>default_initialization)<01>cls<6C>r <00>P/home/amir/Desktop/saburlyweb/env/lib/python3.10/site-packages/sqlparse/lexer.py<70>get_default_instance0s
 
<EFBFBD><02>
<EFBFBD><10>zLexer.get_default_instancecCs<>|<00><00>|<00>tj<03>|<00>tj<05>|<00>tj<06>|<00>tj<07>|<00>tj<08>|<00>tj <09>|<00>tj
<EFBFBD>|<00>tj <0B>|<00>tj <0C>|<00>tj <0A>dS)zlInitialize the lexer with default dictionaries.
Useful if you need to revert custom syntax settings.N)<0E>clear<61> set_SQL_REGEXr<00> SQL_REGEX<45> add_keywords<64>KEYWORDS_COMMON<4F>KEYWORDS_ORACLE<4C>KEYWORDS_MYSQL<51>KEYWORDS_PLPGSQL<51> KEYWORDS_HQL<51>KEYWORDS_MSACCESS<53>KEYWORDS_SNOWFLAKE<4B>KEYWORDS_BIGQUERY<52>KEYWORDS<44><01>selfr r r r
:s         zLexer.default_initializationcCsg|_g|_dS)z<>Clear all syntax configurations.
Useful if you want to load a reduced set of syntax configurations.
After this call, regexps and keyword dictionaries need to be loaded
to make the lexer functional again.N)<02>
_SQL_REGEX<EFBFBD> _keywordsrr r r rIs
z Lexer.clearcs$tjtjB<00><00>fdd<02>|D<00>|_dS)z.Set the list of regex that will parse the SQL.cs"g|] \}}t<00>|<01><00>j|f<02>qSr )<03>re<72>compile<6C>match)<03>.0<EFBFBD>rx<72>tt<74><01>FLAGSr r <00>
<listcomp>Ts<10><06>z'Lexer.set_SQL_REGEX.<locals>.<listcomp>N)r <00>
IGNORECASE<EFBFBD>UNICODEr)rrr r&r rQs 
 <0C>zLexer.set_SQL_REGEXcCs|j<00>|<01>dS)zhAdd keyword dictionaries. Keywords are looked up in the same order
that dictionaries were added.N)r<00>append)rrr r r rYszLexer.add_keywordscCs6|<01><00>}|jD]}||vr|||fSqtj|fS)z<>Checks for a keyword.
If the given value is in one of the KEYWORDS_* dictionary
it's considered a keyword. Otherwise, tokens.Name is returned.
)<04>upperrr<00>Name)r<00>value<75>val<61>kwdictr r r <00>
is_keyword^s 
<02>
zLexer.is_keywordc cs <00>t|t<01>r
|<01><02>}t|t<03>rn,t|t<04>r3|r|<01>|<02>}nz|<01>d<01>}Wnty2|<01>d<02>}Yn
wtd<03>t |<01><01><01><01>t
|<01>}|D]A\}}|j D]3\}}|||<04>}|sUqIt|t j <0A>rc||<08><0E>fVn |tjurp|<00>|<08><0E><00>Vt||<08><13>|d<00>nt j|fVqBdS)a<>
Return an iterable of (tokentype, value) pairs generated from
`text`. If `unfiltered` is set to `True`, the filtering mechanism
is bypassed even if filters are defined.
Also preprocess the text, i.e. expand tabs and strip it if
wanted and applies registered filters.
Split ``text`` into (tokentype, text) pairs.
``stack`` is the initial stack (default: ``['root']``)
zutf-8zunicode-escapez+Expected text or file-like object, got {!r}<7D>N)<15>
isinstancer<00>read<61>str<74>bytes<65>decode<64>UnicodeDecodeError<6F> TypeError<6F>format<61>type<70> enumeraterr<00>
_TokenType<EFBFBD>groupr<00>PROCESS_AS_KEYWORDr1r<00>end<6E>Error) r<00>text<78>encoding<6E>iterable<6C>pos<6F>char<61>rexmatch<63>action<6F>mr r r <00>
get_tokensks><02>


  <02>
<04> 
 
 <02><04>zLexer.get_tokens<6E>N)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r rr<00> classmethodrr
rrrr1rJr r r r rs
  rcCst<00><01><00>||<01>S)z<>Tokenize sql.
Tokenize *sql* using the :class:`Lexer` and return a 2-tuple stream
of ``(token type, value)`` items.
)rrrJ)<02>sqlrCr r r <00>tokenize<7A>srRrK) rOr <00> threadingr<00>ior<00>sqlparserr<00>sqlparse.utilsrrrRr r r r <00><module>s