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

Function parse_limit

hardness_eval.py:512–524  ·  view source on GitHub ↗
(toks, start_idx)

Source from the content-addressed store, hash-verified

510
511
512def parse_limit(toks, start_idx):
513 idx = start_idx
514 len_ = len(toks)
515
516 if idx < len_ and toks[idx] == 'limit':
517 idx += 2
518 # make limit value can work, cannot assume put 1 as a fake limit number
519 if type(toks[idx - 1]) != int: # noqa
520 return idx, 1
521
522 return idx, int(toks[idx - 1])
523
524 return idx, None
525
526
527def parse_sql(toks, start_idx, tables_with_alias, schema):

Callers 1

parse_sqlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected