MCPcopy Index your code
hub / github.com/questdb/questdb / execute_loop

Function execute_loop

compat/src/test/python/runner_psycopg2.py:59–74  ·  view source on GitHub ↗
(loop_def, variables, cursor, connection)

Source from the content-addressed store, hash-verified

57
58
59def execute_loop(loop_def, variables, cursor, connection):
60 loop_var_name = loop_def['as']
61 loop_variables = variables.copy()
62
63 if 'over' in loop_def:
64 iterable = loop_def['over']
65 elif 'range' in loop_def:
66 start = loop_def['range']['start']
67 end = loop_def['range']['end']
68 iterable = range(start, end + 1)
69 else:
70 raise ValueError("Loop must have 'over' or 'range' defined.")
71
72 for item in iterable:
73 loop_variables[loop_var_name] = item
74 execute_steps(loop_def['steps'], loop_variables, cursor, connection)
75
76
77def execute_step(step, variables, cursor, connection):

Callers 1

execute_stepsFunction · 0.70

Calls 2

execute_stepsFunction · 0.70
copyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…