(full_text, text_before_cursor, statement)
| 184 | |
| 185 | |
| 186 | def _statement_from_function(full_text, text_before_cursor, statement): |
| 187 | current_pos = len(text_before_cursor) |
| 188 | body_start, body_end = _find_function_body(full_text) |
| 189 | if body_start is None: |
| 190 | return full_text, text_before_cursor, statement |
| 191 | if not body_start <= current_pos < body_end: |
| 192 | return full_text, text_before_cursor, statement |
| 193 | full_text = full_text[body_start:body_end] |
| 194 | text_before_cursor = text_before_cursor[body_start:] |
| 195 | parsed = sqlparse.parse(text_before_cursor) |
| 196 | return _split_multiple_statements(full_text, text_before_cursor, parsed) |
| 197 | |
| 198 | |
| 199 | def _split_multiple_statements(full_text, text_before_cursor, parsed): |
no test coverage detected