def insertIdentifiers(self,db):
        c=db.cursor()
        keyCol = self.columns[0][0]
        if self.hashUpdateQueue:
            params = [(md5Int, termType, lexical)
                      for md5Int, (termType, lexical)
                        in self.hashUpdateQueue.items()
                        if len(self.getRowsByHash(db, md5Int)) == 0]
            if len(params) > 0:
                c.executemany(
                  "INSERT INTO %s" % (self,) + " VALUES (%s,%s,%s)", params)
            
            if COLLISION_DETECTION:
                insertedIds = self.hashUpdateQueue.keys()
                if len(insertedIds) > 1:
                    c.execute("SELECT * FROM %s" % \
                            (self)+" WHERE %s" % \
                                keyCol+" in %s",(tuple(insertedIds),))
                else:
                    c.execute("SELECT * FROM %s" % \
                            (self)+" WHERE %s" % \
                                keyCol+" = %s",tuple(insertedIds))
                for key,termType,lexical in c.fetchall():
                    if self.hashUpdateQueue[key] != (termType,lexical):
                        # Collision!!! Raise an exception (allow the app to 
                        # rollback the transaction if it wants to)
                        raise Exception(
                            "Hash Collision (in %s) on %s,%s vs %s,%s!" % \
                                (self, termType, lexical, 
                                self.hashUpdateQueue[key][0],
                                self.hashUpdateQueue[key][1]))
            
            self.hashUpdateQueue = {}
        c.close()
dataset/ETHPy150Open RDFLib/rdfextras/rdfextras/store/FOPLRelationalModel/RelationalHash.py/IdentifierHash.insertIdentifiers/original