MCPcopy Create free account
hub / github.com/dbcli/mssql-cli / _refresh_arg_list_cache

Method _refresh_arg_list_cache

mssqlcli/mssqlcompleter.py:248–261  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 1

extend_functionsMethod · 0.95

Calls 1

_arg_listMethod · 0.95

Tested by

no test coverage detected