Skip to content

Commit 3c78b07

Browse files
committed
Sqlserver conversions
still need to do sqlserver pk_column... didn't have time to start up docker to test how that get returned
1 parent a465cd4 commit 3c78b07

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pysimplesql/pysimplesql.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7545,7 +7545,7 @@ def get_tables(self):
75457545
"SELECT table_name FROM information_schema.tables WHERE table_catalog = ?"
75467546
)
75477547
rows = self.execute(query, [self.database], silent=True)
7548-
return [row["table_name"] for row in rows]
7548+
return list(rows["table_name"])
75497549

75507550
def column_info(self, table):
75517551
# Return a list of column names
@@ -7561,10 +7561,10 @@ def column_info(self, table):
75617561
WHERE TABLE_NAME = ?
75627562
"""
75637563
pk_rows = self.execute(pk_query, [table], silent=True)
7564-
for pk_row in pk_rows:
7564+
for _, pk_row in pk_rows.iterrows():
75657565
pk_columns.append(pk_row["COLUMN_NAME"])
75667566

7567-
for row in rows:
7567+
for _, row in rows.iterrows():
75687568
name = row["COLUMN_NAME"]
75697569
domain = row["DATA_TYPE"].upper()
75707570
notnull = row["IS_NULLABLE"] == "NO"
@@ -7601,7 +7601,7 @@ def relationships(self):
76017601

76027602
rows = self.execute(query, silent=True)
76037603

7604-
for row in rows:
7604+
for _, row in rows.iterrows():
76057605
dic = {}
76067606
dic["from_table"] = row["from_table"]
76077607
dic["to_table"] = row["to_table"]

0 commit comments

Comments
 (0)