New insert player function for HHC import

Added getSqlPlayerIDs to Database.py - returns a hash {playername:sqlid}

Function uses a caching hash in Database.py to reduce the number of round trips to the database needed just to fetch the player ids for later inserts.

Need to do a performance comparison on a larger import.
This commit is contained in:
Worros
2009-08-02 12:19:33 +08:00
parent 40a0fe428b
commit ff2cca361c
3 changed files with 45 additions and 2 deletions
+2 -2
View File
@@ -401,8 +401,8 @@ class Importer:
self.pos_in_file[file] = hhc.getLastCharacterRead()
for hand in handlist:
hand.prepInsert()
hand.insert()
#hand.prepInsert()
hand.insert(self.database)
else:
# conversion didn't work
# TODO: appropriate response?