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

Method _refresh_arg_list_cache

pgcli/pgcompleter.py:254–266  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

252 self._refresh_arg_list_cache()
253
254 def _refresh_arg_list_cache(self):
255 # We keep a cache of {function_usage:{function_metadata: function_arg_list_string}}
256 # This is used when suggesting functions, to avoid the latency that would result
257 # if we'd recalculate the arg lists each time we suggest functions (in large DBs)
258 self._arg_list_cache = {
259 usage: {
260 meta: self._arg_list(meta, usage)
261 for sch, funcs in self.dbmetadata["functions"].items()
262 for func, metas in funcs.items()
263 for meta in metas
264 }
265 for usage in ("call", "call_display", "signature")
266 }
267
268 def extend_foreignkeys(self, fk_data):
269 # fk_data is a list of ForeignKey namedtuples, with fields

Callers 1

extend_functionsMethod · 0.95

Calls 1

_arg_listMethod · 0.95

Tested by

no test coverage detected