MCPcopy
hub / github.com/dbcli/pgcli / refresh_completions

Method refresh_completions

pgcli/main.py:1246–1262  ·  view source on GitHub ↗

Refresh outdated completions :param history: A prompt_toolkit.history.FileHistory object. Used to load keyword and identifier preferences :param persist_priorities: 'all' or 'keywords'

(self, history=None, persist_priorities="all")

Source from the content-addressed store, hash-verified

1244 self.execute_command(text, handle_closed_connection=False)
1245
1246 def refresh_completions(self, history=None, persist_priorities="all"):
1247 """Refresh outdated completions
1248
1249 :param history: A prompt_toolkit.history.FileHistory object. Used to
1250 load keyword and identifier preferences
1251
1252 :param persist_priorities: 'all' or 'keywords'
1253 """
1254
1255 callback = functools.partial(self._on_completions_refreshed, persist_priorities=persist_priorities)
1256 return self.completion_refresher.refresh(
1257 self.pgexecute,
1258 self.pgspecial,
1259 callback,
1260 history=history,
1261 settings=self.settings,
1262 )
1263
1264 def _on_completions_refreshed(self, new_completer, persist_priorities):
1265 self._swap_completer_objects(new_completer, persist_priorities)

Callers 3

refresh_callbackMethod · 0.95
execute_commandMethod · 0.95
run_cliMethod · 0.95

Calls 1

refreshMethod · 0.80

Tested by

no test coverage detected