Skip to content

Commit 887f571

Browse files
authored
Fixing attribute error for column meta data. (#200)
1 parent df77206 commit 887f571

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mssqlcli/mssqlcompleter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def get_join_matches(self, suggestion, word_before_cursor):
549549
joins = []
550550
# Iterate over FKs in existing tables to find potential joins
551551
fks = ((fk, rtbl, rcol) for rtbl, rcols in cols.items()
552-
for rcol in rcols for fk in rcol.get_foreign_keys)
552+
for rcol in rcols for fk in rcol.foreignkeys)
553553
col = namedtuple('col', 'schema tbl col')
554554
for fk, rtbl, rcol in fks:
555555
right = col(rtbl.schema, rtbl.name, rcol.name)
@@ -614,7 +614,7 @@ def list_dict(pairs): # Turns [(a, b), (a, c)] into {a: [b, c]}
614614
for t, c in cols if t.ref != lref)
615615
# For each fk from the left table, generate a join condition if
616616
# the other table is also in the scope
617-
fks = ((fk, lcol.name) for lcol in lcols for fk in lcol.get_foreign_keys)
617+
fks = ((fk, lcol.name) for lcol in lcols for fk in lcol.foreignkeys)
618618
for fk, lcol in fks:
619619
left = col(ltbl.schema, ltbl.name, lcol)
620620
child = col(fk.childschema, fk.childtable, fk.childcolumn)

0 commit comments

Comments
 (0)