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

Method add_cond

pgcli/pgcompleter.py:616–622  ·  view source on GitHub ↗
(lcol, rcol, rref, prio, meta)

Source from the content-addressed store, hash-verified

614 conds, found_conds = [], set()
615
616 def add_cond(lcol, rcol, rref, prio, meta):
617 prefix = "" if suggestion.parent else ltbl.ref + "."
618 case = self.case
619 cond = prefix + case(lcol) + " = " + rref + "." + case(rcol)
620 if cond not in found_conds:
621 found_conds.add(cond)
622 conds.append(Candidate(cond, prio + ref_prio[rref], meta))
623
624 def list_dict(pairs): # Turns [(a, b), (a, c)] into {a: [b, c]}
625 d = defaultdict(list)

Callers

nothing calls this directly

Calls 1

CandidateFunction · 0.85

Tested by

no test coverage detected