コード例 #1
0
def resetTheAvailability():
   c = flightUtil.connection()
   cur = c.cursor()
   cur.execute(flightUtil.resetDirectFlightAvailabilityQuery)
   cur.fetchall()
   cur.execute(flightUtil.commit)
   cur.fetchall()
   cur.execute(flightUtil.resetOneStopFlightAvailabilityQuery)
   cur.fetchall()
   cur.execute(flightUtil.commit)
   cur.fetchall()
   cur.execute(flightUtil.resetTwoStopFlightAvailabilityQuery)
   cur.fetchall()
   cur.execute(flightUtil.commit)
   cur.fetchall()
   cur.execute(flightUtil.resetDirectFlightsDetailsAvailabilityQuery)
   cur.fetchall()
   cur.execute(flightUtil.commit)
   cur.fetchall()
   cur.execute(flightUtil.resetOneStopFlightsDetailsAvailabilityQuery)
   cur.fetchall()
   cur.execute(flightUtil.commit)
   cur.fetchall()
   cur.execute(flightUtil.resetTwoStopFlightsDetailsAvailabilityQuery)
   cur.fetchall()
   cur.execute(flightUtil.commit)
   cur.fetchall()
コード例 #2
0
def cityPairList():
   cnx = flightUtil.connection()
   cur = cnx.cursor()
   cur.execute(cityQuery())
   dataDuplicate = cur.fetchall()
   data = set(dataDuplicate)
   cnx.close()
   return [(city1[0],city2[0]) for city1 in data for city2 in data if city1[0]!=city2[0]]
コード例 #3
0
def logError(traceBack,information,typ):
   return #$
   c = flightUtil.connection()
   cur = c.cursor()
   query = flightUtil.errorLoggingQuery%(traceBack,information,typ)
   print query
   cur.execute(query)
   cur.fetchall()
   cur.execute(flightUtil.commit)