MCPcopy Index your code
hub / github.com/dbcli/pgcli / update_keywords

Method update_keywords

pgcli/packages/prioritization.py:42–47  ·  view source on GitHub ↗
(self, text)

Source from the content-addressed store, hash-verified

40 self.name_counts = defaultdict(int)
41
42 def update_keywords(self, text):
43 # Count keywords. Can't rely for sqlparse for this, because it's
44 # database agnostic
45 for keyword, regex in keyword_regexs.items():
46 for _ in regex.finditer(text):
47 self.keyword_counts[keyword] += 1
48
49 def keyword_count(self, keyword):
50 return self.keyword_counts[keyword]

Callers 2

updateMethod · 0.95
extend_query_historyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected