From b41afcd0762d675a7e1e6e3a38143e572cc2686a Mon Sep 17 00:00:00 2001 From: Worros Date: Sat, 14 Mar 2009 21:19:20 +0900 Subject: [PATCH] Add stub insert and select methods to Hand class --- pyfpdb/Hand.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 49517ab7..b1615c8f 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -77,6 +77,27 @@ class Hand: self.rake = None + def insert(self, db): + """ Function to insert Hand into database +Should not commit, and do minimal selects. Callers may want to cache commits +db: a connected fpdb_db object""" + # TODO: + # Players - base playerid and siteid tuple + # HudCache data to come from DerivedStats class + # HandsActions - all actions for all players for all streets - self.actions + # BoardCards - ? + # Hands - Summary information of hand indexed by handId - gameinfo + # HandsPlayers - ? ... Do we fix winnings? + # Tourneys ? + # TourneysPlayers + + pass + + def select(self, handId): + """ Function to create Hand object from database """ + pass + + def addPlayer(self, seat, name, chips): """\ Adds a player to the hand, and initialises data structures indexed by player.