More HandsActions stubbing

This commit is contained in:
Worros 2010-09-02 00:19:31 +08:00
parent b8a8a7217c
commit 26eca40b31
3 changed files with 30 additions and 5 deletions

View File

@ -1782,7 +1782,15 @@ class Database:
# adata[p]['sitout'], # adata[p]['sitout'],
# adata[p]['card1'], # adata[p]['card1'],
#q = self.sql.query['store_hands_actions'] #handsPlayerId BIGINT UNSIGNED NOT NULL, FOREIGN KEY (handsPlayerId) REFERENCES HandsPlayers(id),
#street SMALLINT NOT NULL,
#actionNo SMALLINT NOT NULL,
#action CHAR(5) NOT NULL,
#allIn BOOLEAN NOT NULL,
#amount INT NOT NULL,
q = self.sql.query['store_hands_actions']
#q = q.replace('%s', self.sql.query['placeholder']) #q = q.replace('%s', self.sql.query['placeholder'])
#print "DEBUG: inserts: %s" %inserts #print "DEBUG: inserts: %s" %inserts

View File

@ -97,10 +97,12 @@ class DerivedStats():
self.assembleHandsActions(self.hand) self.assembleHandsActions(self.hand)
if DEBUG: if DEBUG:
print "Hands:" #print "Hands:"
pp.pprint(self.hands) #pp.pprint(self.hands)
print "HandsPlayers:" #print "HandsPlayers:"
pp.pprint(self.handsplayers) #pp.pprint(self.handsplayers)
print "HandsActions:"
pp.pprint(self.handsactions)
def getHands(self): def getHands(self):
return self.hands return self.hands
@ -214,6 +216,8 @@ class DerivedStats():
# Squeeze, Ratchet? # Squeeze, Ratchet?
def assembleHandsActions(self, hand): def assembleHandsActions(self, hand):
print "DEBUG: hand.actions"
pp.pprint(hand.actions)
pass pass
def setPositions(self, hand): def setPositions(self, hand):

View File

@ -4222,6 +4222,19 @@ class Sql:
%s, %s, %s, %s, %s %s, %s, %s, %s, %s
)""" )"""
self.query['store_hands_actions'] = """INSERT INTO HandsActions (
handsPlayerId,
street,
actionNo,
action,
allIn,
amount
)
VALUES (
%s, %s, %s, %s, %s,
%s
)"""
################################ ################################
# Counts for DB stats window # Counts for DB stats window
################################ ################################