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

Function plugin

evaluation/test-suite-sql-eval/parse.py:109–117  ·  view source on GitHub ↗
(query_value_replaced: List[str], values_in_order: List[str])

Source from the content-addressed store, hash-verified

107
108# plug in the values into query with value slots
109def plugin(query_value_replaced: List[str], values_in_order: List[str]) -> str:
110 q_length = len(query_value_replaced)
111 query_w_values = query_value_replaced[:]
112 value_idx = [idx for idx in range(q_length) if query_value_replaced[idx] == VALUE_NUM_SYMBOL.lower()]
113 assert len(value_idx) == len(values_in_order)
114
115 for idx, value in zip(value_idx, values_in_order):
116 query_w_values[idx] = value
117 return ' '.join(query_w_values)
118
119
120# a generator generating all possible ways of

Callers 1

plugin_all_permutationsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected