MCPcopy Index your code
hub / github.com/dbcli/mycli / _enum_value_suggestion

Function _enum_value_suggestion

mycli/packages/completion_engine.py:565–583  ·  view source on GitHub ↗
(text_before_cursor: str, full_text: str)

Source from the content-addressed store, hash-verified

563
564
565def _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
586def _charset_suggestion(tokens: list[Token]) -> list[dict[str, str]] | None:

Calls 4

extract_tablesFunction · 0.90
is_inside_quotesFunction · 0.85
splitMethod · 0.80
startMethod · 0.45