MCPcopy Index your code
hub / github.com/dbcli/mycli / run

Function run

test/utils.py:274–289  ·  view source on GitHub ↗

Return string output for the sql to be run.

(executor, sql, rows_as_list=True)

Source from the content-addressed store, hash-verified

272
273
274def run(executor, sql, rows_as_list=True):
275 """Return string output for the sql to be run."""
276 results = []
277
278 for result in executor.run(sql):
279 rows = list(result.rows) if (rows_as_list and result.rows) else result.rows
280 results.append({
281 "preamble": result.preamble,
282 "header": result.header,
283 "rows": rows,
284 "postamble": result.postamble,
285 "status": result.status,
286 "status_plain": result.status_plain,
287 })
288
289 return results
290
291
292def set_expanded_output(is_expanded):

Callers 15

test_connFunction · 0.90
test_boolsFunction · 0.90
test_binaryFunction · 0.90
test_invalid_syntaxFunction · 0.90
test_invalid_column_nameFunction · 0.90

Calls 1

runMethod · 0.45

Tested by 15

test_connFunction · 0.72
test_boolsFunction · 0.72
test_binaryFunction · 0.72
test_invalid_syntaxFunction · 0.72
test_invalid_column_nameFunction · 0.72