Determines if the completion needs a refresh by checking if the sql statement is an alter, create, drop, commit or rollback.
(query)
| 1743 | |
| 1744 | |
| 1745 | def 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 | |
| 1758 | def has_change_db_cmd(query): |