def add(self, **fields): spendingName = SpendingName() fields['spendingNameId'] = spendingName.getIdByName(fields['spendingName']) del fields['spendingName'] self.__checkIsFieldsExists(**fields) fields = self.__encryptData(**fields) spendingId = db.insert(self.__table, **fields) return spendingId
def __add(self, **fields): self.__checkIsFieldsExists(**fields) spendingId = db.insert(self.__table, **fields) return spendingId
def addlinkref(self, urlFrom, urls, linkTexts, words): fromid = self.getUrlid('urlFrom', urlFrom)#got url origin web if fromid != None: return return connection.insert(urlFrom=urlFrom, urls=urls, words=words, linkTexts=linkTexts)