| 563 | |
| 564 | |
| 565 | def _enum_value_suggestion(text_before_cursor: str, full_text: str) -> dict[str, Any] | None: |
| 566 | match = _ENUM_VALUE_RE.search(text_before_cursor) |
| 567 | if not match: |
| 568 | return None |
| 569 | if is_inside_quotes(text_before_cursor, match.start("lhs")): |
| 570 | return None |
| 571 | |
| 572 | lhs = match.group("lhs") |
| 573 | if "." in lhs: |
| 574 | parent, column = lhs.split(".", 1) |
| 575 | else: |
| 576 | parent, column = None, lhs |
| 577 | |
| 578 | return { |
| 579 | "type": "enum_value", |
| 580 | "tables": extract_tables(full_text), |
| 581 | "column": column, |
| 582 | "parent": parent, |
| 583 | } |
| 584 | |
| 585 | |
| 586 | def _charset_suggestion(tokens: list[Token]) -> list[dict[str, str]] | None: |