|
|
@ -82,7 +82,7 @@ def evaluate(query : str):
|
|
|
|
return tuple(evaluate(q) for q in query)
|
|
|
|
return tuple(evaluate(q) for q in query)
|
|
|
|
query = re.sub(r'//[^\n]*', '', query)
|
|
|
|
query = re.sub(r'//[^\n]*', '', query)
|
|
|
|
query = re.sub(r'(\$?[\d\w_]+)[\s\r\n]*:', r'"\1" :', query)
|
|
|
|
query = re.sub(r'(\$?[\d\w_]+)[\s\r\n]*:', r'"\1" :', query)
|
|
|
|
query = re.sub(r'[\r\n]|.\s*pretty\s*\(\s*\)|.\s*sort\s*\([^\)]*\)', '', query).strip()
|
|
|
|
query = re.sub(r'[\r\n]|.\s*(pretty|toArray)\s*\(\s*\)|.\s*sort\s*\([^\)]*\)', '', query).strip()
|
|
|
|
if not query: return [None] * 2
|
|
|
|
if not query: return [None] * 2
|
|
|
|
query = re.sub(r'.\s*aggregate\s*\(\s*([^\[^\s][^\)]*)\)', r'.aggregate([\1])', query)
|
|
|
|
query = re.sub(r'.\s*aggregate\s*\(\s*([^\[^\s][^\)]*)\)', r'.aggregate([\1])', query)
|
|
|
|
|
|
|
|
|
|
|
|