(self, query)
| 93 | return owner_uri, error_messages |
| 94 | |
| 95 | def execute_query(self, query): |
| 96 | # Try to run first as special command |
| 97 | try: |
| 98 | for rows, columns, status, statement, is_error in special.execute(self, query): |
| 99 | yield rows, columns, status, statement, is_error |
| 100 | except special.CommandNotFound: |
| 101 | # Execute as normal sql |
| 102 | # Remove spaces, EOL and semi-colons from end |
| 103 | query = query.strip() |
| 104 | if not query: |
| 105 | yield None, None, None, query, False |
| 106 | else: |
| 107 | for single_query in sqlparse.split(query): |
| 108 | # Remove spaces, EOL and semi-colons from end |
| 109 | single_query = single_query.strip() |
| 110 | if single_query: |
| 111 | for rows, columns, status, statement, is_error \ |
| 112 | in self._execute_query(single_query): |
| 113 | yield rows, columns, status, statement, is_error |
| 114 | else: |
| 115 | yield None, None, None, None, False |
| 116 | continue |
| 117 | |
| 118 | def _execute_query(self, query): |
| 119 | query_response, query_messages, query_had_error \ |
no test coverage detected