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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user