MCPcopy Create free account
hub / github.com/awslabs/gap-text2sql / get_sql

Function get_sql

rat-sql-gap/seq2struct/datasets/spider_lib/process_sql.py:550–555  ·  view source on GitHub ↗
(schema, query)

Source from the content-addressed store, hash-verified

548
549
550def get_sql(schema, query):
551 toks = tokenize(query)
552 tables_with_alias = get_tables_with_alias(schema.schema, toks)
553 _, sql = parse_sql(toks, 0, tables_with_alias, schema)
554
555 return sql
556
557
558def skip_semicolon(toks, start_idx):

Callers 2

evaluate_oneMethod · 0.90
parse_raw_json.pyFile · 0.90

Calls 3

tokenizeFunction · 0.85
get_tables_with_aliasFunction · 0.85
parse_sqlFunction · 0.85

Tested by

no test coverage detected