示例#1
0
 def getBridgesLastUpdatedBefore(self, statusPublicationMillis):
     cur = self._cur
     v = cur.execute("SELECT * FROM BridgeHistory WHERE lastUpdatedWeightedTime < ?",
                     (statusPublicationMillis,))
     if v is None: return
     for h in v:
         yield BridgeHistory(h[0],IPAddress(h[1]),h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10])
示例#2
0
 def getAllBridgeHistory(self):
     cur = self._cur
     v = cur.execute("SELECT * FROM BridgeHistory")
     if v is None: return
     for h in v:
         yield BridgeHistory(h[0], IPAddress(h[1]), h[2], h[3], h[4], h[5],
                             h[6], h[7], h[8], h[9], h[10])
示例#3
0
 def getBridgeHistory(self, fp):
     cur = self._cur
     cur.execute("SELECT * FROM BridgeHistory WHERE fingerprint = ?", (fp,))
     h = cur.fetchone()
     if h is None: 
         return
     return BridgeHistory(h[0],IPAddress(h[1]),h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10])