def query_byMac(mac): computerInfo = dbSession.query(ComputerInfo).filter( ComputerInfo.MACAddress == mac).first() if not computerInfo: return None else: return computerInfo
def query_byIPv4(ipv4): computerInfo = dbSession.query(ComputerInfo).filter( ComputerInfo.IPv4Address == ipv4).first() if not computerInfo: return None else: return computerInfo
def query_byMail(mail): computerInfo = dbSession.query(ComputerInfo).join( Employee, ComputerInfo.MACAddress == Employee.MACAddress).filter( Employee.mail == mail).first() if not computerInfo: return None else: return computerInfo
def query_byMail(mail): vi = dbSession.query(VerifyInfo).filter( VerifyInfo.mail == mail).first() return vi
def query_byMail(mail): employee = dbSession.query(Employee).filter(Employee.mail == mail).first() return employee