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

Method add_cond

mssqlcli/mssqlcompleter.py:624–630  ·  view source on GitHub ↗
(lcol, rcol, rref, prio, meta)

Source from the content-addressed store, hash-verified

622 conds, found_conds = [], set()
623
624 def add_cond(lcol, rcol, rref, prio, meta):
625 prefix = '' if suggestion.parent else ltbl.ref + '.'
626 case = self.case
627 cond = prefix + case(lcol) + ' = ' + rref + '.' + case(rcol)
628 if cond not in found_conds:
629 found_conds.add(cond)
630 conds.append(Candidate(cond, prio + ref_prio[rref], meta))
631
632 def list_dict(pairs): # Turns [(a, b), (a, c)] into {a: [b, c]}
633 d = defaultdict(list)

Callers

nothing calls this directly

Calls 1

CandidateFunction · 0.85

Tested by

no test coverage detected