MCPcopy
hub / github.com/andialbrecht/sqlparse / tokenize

Function tokenize

sqlparse/lexer.py:155–161  ·  view source on GitHub ↗

Tokenize sql. Tokenize *sql* using the :class:`Lexer` and return a 2-tuple stream of ``(token type, value)`` items.

(sql, encoding=None)

Source from the content-addressed store, hash-verified

153
154
155def tokenize(sql, encoding=None):
156 """Tokenize sql.
157
158 Tokenize *sql* using the :class:`Lexer` and return a 2-tuple stream
159 of ``(token type, value)`` items.
160 """
161 return Lexer.get_default_instance().get_tokens(sql, encoding)

Callers

nothing calls this directly

Calls 2

get_tokensMethod · 0.80
get_default_instanceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…