MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / has_meta_cmd

Method has_meta_cmd

mssqlcli/mssql_cli.py:725–732  ·  view source on GitHub ↗

Determines if the completion needs a refresh by checking if the sql statement is an alter, create, drop, commit or rollback.

(query)

Source from the content-addressed store, hash-verified

723
724 @staticmethod
725 def has_meta_cmd(query):
726 """Determines if the completion needs a refresh by checking if the sql
727 statement is an alter, create, drop, commit or rollback."""
728 if query and isinstance(query, str):
729 first_token = query.split()[0]
730 if first_token.lower() in ('alter', 'create', 'drop'):
731 return True
732 return False
733
734 @staticmethod
735 def has_change_db_cmd(query):

Callers 1

_evaluate_commandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected