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

Function get_nestedSQL

single_eval.py:206–219  ·  view source on GitHub ↗
(sql)

Source from the content-addressed store, hash-verified

204
205
206def get_nestedSQL(sql):
207 nested = []
208 for cond_unit in sql['from']['conds'][::2] + sql['where'][::2] + sql['having'][::2]:
209 if type(cond_unit[3]) is dict:
210 nested.append(cond_unit[3])
211 if type(cond_unit[4]) is dict:
212 nested.append(cond_unit[4])
213 if sql['intersect'] is not None:
214 nested.append(sql['intersect'])
215 if sql['except'] is not None:
216 nested.append(sql['except'])
217 if sql['union'] is not None:
218 nested.append(sql['union'])
219 return nested
220
221
222def eval_nested(pred, label):

Callers 1

count_component2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected