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

Function get_nestedSQL

hardness_eval.py:745–758  ·  view source on GitHub ↗
(sql)

Source from the content-addressed store, hash-verified

743
744
745def get_nestedSQL(sql):
746 nested = []
747 for cond_unit in sql['from']['conds'][::2] + sql['where'][::2] + sql['having'][::2]:
748 if type(cond_unit[3]) is dict:
749 nested.append(cond_unit[3])
750 if type(cond_unit[4]) is dict:
751 nested.append(cond_unit[4])
752 if sql['intersect'] is not None:
753 nested.append(sql['intersect'])
754 if sql['except'] is not None:
755 nested.append(sql['except'])
756 if sql['union'] is not None:
757 nested.append(sql['union'])
758 return nested
759
760
761def get_keywords(sql):

Callers 1

count_component2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected