def getAssetNameDb(self, assetName) : dbPath = str(self.ui.db_lineEdit.text()) conn = sqlite3.connect(dbPath) result = db.getAssetName(conn, assetName) assetNames = [a for a in result] conn.close() return assetNames
def getObjectIDRecord(self, assetName) : conn = sqlite3.connect(str(self.ui.db_lineEdit.text())) result = db.getAssetName(conn, assetName) data = [] for each in result : data.append(each) conn.close() if len(data) == 1 : return data[0] if len(data) > 1 : trace('More than 1 asset match name') return data[0]