rename tourney methods in DB
This commit is contained in:
parent
f5c1fd4ed7
commit
e2087d60a1
|
@ -1933,7 +1933,7 @@ class Database:
|
||||||
print "***Error sending finish: "+err[2]+"("+str(err[1])+"): "+str(sys.exc_info()[1])
|
print "***Error sending finish: "+err[2]+"("+str(err[1])+"): "+str(sys.exc_info()[1])
|
||||||
# end def send_finish_msg():
|
# end def send_finish_msg():
|
||||||
|
|
||||||
def getTourneyTypeId(self, tourney):
|
def createOrUpdateTourneyType(self, tourney):
|
||||||
tourneyTypeId = 1
|
tourneyTypeId = 1
|
||||||
|
|
||||||
# Check if Tourney exists, and if so retrieve TTypeId : in that case, check values of the ttype
|
# Check if Tourney exists, and if so retrieve TTypeId : in that case, check values of the ttype
|
||||||
|
@ -1977,9 +1977,9 @@ class Database:
|
||||||
)
|
)
|
||||||
tourneyTypeId = self.get_last_insert_id(cursor)
|
tourneyTypeId = self.get_last_insert_id(cursor)
|
||||||
return tourneyTypeId
|
return tourneyTypeId
|
||||||
#end def getTourneyTypeId
|
#end def createOrUpdateTourneyType
|
||||||
|
|
||||||
def getTourneyId(self, tourney):
|
def createOrUpdateTourney(self, tourney):
|
||||||
cursor = self.get_cursor()
|
cursor = self.get_cursor()
|
||||||
cursor.execute (self.sql.query['getTourneyIdByTourneyNo'].replace('%s', self.sql.query['placeholder']),
|
cursor.execute (self.sql.query['getTourneyIdByTourneyNo'].replace('%s', self.sql.query['placeholder']),
|
||||||
(tourney.siteId, tourney.tourNo))
|
(tourney.siteId, tourney.tourNo))
|
||||||
|
@ -1994,11 +1994,11 @@ class Database:
|
||||||
tourney.totalRebuyCount, tourney.totalAddOnCount))
|
tourney.totalRebuyCount, tourney.totalAddOnCount))
|
||||||
tourneyId = self.get_last_insert_id(cursor)
|
tourneyId = self.get_last_insert_id(cursor)
|
||||||
return tourneyId
|
return tourneyId
|
||||||
#end def getTourneyId
|
#end def createOrUpdateTourney
|
||||||
|
|
||||||
def getTourneysPlayersIds(self, tourney):
|
def createOrUpdateTourneysPlayers(self, tourney):
|
||||||
print "TODO implement getTourneysPlayersIds"
|
print "TODO implement createOrUpdateTourneysPlayers"
|
||||||
#end def getTourneysPlayersIds
|
#end def createOrUpdateTourneysPlayers
|
||||||
#end class Database
|
#end class Database
|
||||||
|
|
||||||
# Class used to hold all the data needed to write a hand to the db
|
# Class used to hold all the data needed to write a hand to the db
|
||||||
|
|
|
@ -215,11 +215,11 @@ dealt whether they were seen in a 'dealt to' line
|
||||||
|
|
||||||
if self.tourney!=None:
|
if self.tourney!=None:
|
||||||
self.tourney=Tourney.Tourney(self.sitename, self.gametype, None, builtFrom="HHC-HH", hand=self)
|
self.tourney=Tourney.Tourney(self.sitename, self.gametype, None, builtFrom="HHC-HH", hand=self)
|
||||||
self.tourney.tourneyTypeId = db.getTourneyTypeId(self.tourney)
|
self.tourney.tourneyTypeId = db.createOrUpdateTourneyType(self.tourney)
|
||||||
db.commit()
|
db.commit()
|
||||||
self.tourney.tourneyId = db.getTourneyId(self.tourney)
|
self.tourney.tourneyId = db.createOrUpdateTourney(self.tourney)
|
||||||
db.commit()
|
db.commit()
|
||||||
self.tourney.tourneysPlayersIds = db.getTourneysPlayersIds(self.tourney)
|
self.tourney.tourneysPlayersIds = db.createOrUpdateTourneysPlayers(self.tourney)
|
||||||
db.commit()
|
db.commit()
|
||||||
#end def prepInsert
|
#end def prepInsert
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user