Determines if the statement is a database switch such as 'use' or '\\c
(query)
| 1756 | |
| 1757 | |
| 1758 | def has_change_db_cmd(query): |
| 1759 | """Determines if the statement is a database switch such as 'use' or '\\c'""" |
| 1760 | try: |
| 1761 | first_token = query.split()[0] |
| 1762 | if first_token.lower() in ("use", "\\c", "\\connect"): |
| 1763 | return True |
| 1764 | except Exception: |
| 1765 | return False |
| 1766 | |
| 1767 | return False |
| 1768 | |
| 1769 | |
| 1770 | def has_change_path_cmd(sql): |