MCPcopy Index your code
hub / github.com/dbcli/pgcli / has_meta_cmd

Function has_meta_cmd

pgcli/main.py:1745–1755  ·  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

1743
1744
1745def has_meta_cmd(query):
1746 """Determines if the completion needs a refresh by checking if the sql
1747 statement is an alter, create, drop, commit or rollback."""
1748 try:
1749 first_token = query.split()[0]
1750 if first_token.lower() in ("alter", "create", "drop", "commit", "rollback"):
1751 return True
1752 except Exception:
1753 return False
1754
1755 return False
1756
1757
1758def has_change_db_cmd(query):

Callers 1

_evaluate_commandMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected