MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / tokenize

Function tokenize

evaluation/test-suite-sql-eval/parse.py:14–16  ·  view source on GitHub ↗
(query: str)

Source from the content-addressed store, hash-verified

12
13
14def tokenize(query: str) -> List[Token]:
15 tokens = list([Token(t.ttype, t.value) for t in sqlparse.parse(query)[0].flatten()])
16 return tokens
17
18
19def join_tokens(tokens: List[Token]) -> str:

Callers 2

round_trip_testFunction · 0.70
reformat_queryFunction · 0.70

Calls 1

flattenMethod · 0.80

Tested by

no test coverage detected