MCPcopy Index your code
hub / github.com/dbcli/mssql-cli / execute_query

Method execute_query

mssqlcli/mssql_cli.py:369–378  ·  view source on GitHub ↗

Processes a query string and outputs to file or terminal

(self, text)

Source from the content-addressed store, hash-verified

367 return output
368
369 def execute_query(self, text):
370 """ Processes a query string and outputs to file or terminal """
371 if self.interactive_mode:
372 output = self._execute_interactive_command(text)
373 else:
374 # non-interactive mode
375 output, _ = self._evaluate_command(text)
376
377 self._output_query(output)
378 return output
379
380 def _output_query(self, output):
381 """ Specifies how query output is handled """

Callers 15

runMethod · 0.95
run_cli_withFunction · 0.95
_evaluate_commandMethod · 0.45
list_databasesFunction · 0.45
list_schemasFunction · 0.45
list_tablesFunction · 0.45
list_viewsFunction · 0.45
list_indexesFunction · 0.45
list_functionsFunction · 0.45
show_function_definitionFunction · 0.45
describe_objectFunction · 0.45
list_loginsFunction · 0.45

Calls 3

_evaluate_commandMethod · 0.95
_output_queryMethod · 0.95

Tested by 15

test_queryMethod · 0.36
create_test_dbFunction · 0.36
_is_client_db_on_cloudFunction · 0.36
_check_create_db_statusFunction · 0.36
clean_up_test_dbFunction · 0.36
execute_queriesMethod · 0.36
setUpClassMethod · 0.36
tearDownClassMethod · 0.36