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:
@@ -40,10 +40,12 @@ class Hand(object):
|
||||
LCS = {'H':'h', 'D':'d', 'C':'c', 'S':'s'}
|
||||
SYMBOL = {'USD': '$', 'EUR': u'$', 'T$': '', 'play': ''}
|
||||
MS = {'horse' : 'HORSE', '8game' : '8-Game', 'hose' : 'HOSE', 'ha': 'HA'}
|
||||
SITEIDS = {'Fulltilt':1, 'PokerStars':2, 'Everleaf':3, 'Win2day':4, 'OnGame':5, 'UltimateBet':6, 'Betfair':7}
|
||||
|
||||
|
||||
def __init__(self, sitename, gametype, handText, builtFrom = "HHC"):
|
||||
self.sitename = sitename
|
||||
self.siteId = self.SITEIDS[sitename]
|
||||
self.stats = DerivedStats.DerivedStats(self)
|
||||
self.gametype = gametype
|
||||
self.starttime = 0
|
||||
|
||||
Reference in New Issue
Block a user