astrodatagui: StarsDB: implement function to insert star alternative names

This commit is contained in:
2024-03-06 15:42:08 +01:00
parent ccc9301a71
commit 9a33666ae1
+6
View File
@@ -93,3 +93,9 @@ class StarDB():
self.dbCursor.execute(f"""INSERT OR IGNORE INTO
sequenceSourceNames(sequenceSourceNameID, name)
VALUES({i}, \"{s}\")""")
def insertStarAlternativeNames(self, mainName: str, altNames):
for an in altNames:
self.dbCursor.execute(f"""INSERT OR IGNORE INTO
starnames(mainName, altName)
VALUES(\"{mainName}\", \"{an["ID"]}\")""")