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

Function execute_loop

compat/src/test/python/runner_psycopg3.py:123–138  ·  view source on GitHub ↗
(loop_def, variables, cursor: Cursor, connection: Connection)

Source from the content-addressed store, hash-verified

121
122
123def execute_loop(loop_def, variables, cursor: Cursor, connection: Connection):
124 loop_var_name = loop_def['as']
125 loop_variables = variables.copy()
126
127 if 'over' in loop_def:
128 iterable = loop_def['over']
129 elif 'range' in loop_def:
130 start = loop_def['range']['start']
131 end = loop_def['range']['end']
132 iterable = range(start, end + 1)
133 else:
134 raise ValueError("Loop must have 'over' or 'range' defined.")
135
136 for item in iterable:
137 loop_variables[loop_var_name] = item
138 execute_steps(loop_def['steps'], loop_variables, cursor, connection)
139
140
141def wrap_varchar_arrays(parameters, param_types):

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…