improve naming of replacement clauses
This commit is contained in:
parent
b385f9f0da
commit
5cba225fb3
|
@ -1451,8 +1451,8 @@ class Database:
|
|||
+ " or ( hp.playerId in " + str(tuple(self.hero_ids.values())) \
|
||||
+ " and h.startTime > '" + h_start + "'))" \
|
||||
+ " AND hp.tourneysPlayersId IS NULL)"
|
||||
rebuild_sql_cash = self.sql.query['rebuildHudCache'].replace('<tourney1_clause>', "")
|
||||
rebuild_sql_cash = rebuild_sql_cash.replace('<tourney2_clause>', "")
|
||||
rebuild_sql_cash = self.sql.query['rebuildHudCache'].replace('<tourney_insert_clause>', "")
|
||||
rebuild_sql_cash = rebuild_sql_cash.replace('<tourney_select_clause>', "")
|
||||
rebuild_sql_cash = rebuild_sql_cash.replace('<tourney_join_clause>', "")
|
||||
rebuild_sql_cash = rebuild_sql_cash.replace('<tourney_group_clause>', "")
|
||||
rebuild_sql_cash = rebuild_sql_cash.replace('<where_clause>', where)
|
||||
|
@ -1468,13 +1468,13 @@ class Database:
|
|||
+ " or ( hp.playerId in " + str(tuple(self.hero_ids.values())) \
|
||||
+ " and h.startTime > '" + h_start + "'))" \
|
||||
+ " AND hp.tourneysPlayersId >= 0)"
|
||||
rebuild_sql_tourney = self.sql.query['rebuildHudCache'].replace('<tourney1_clause>', ",tourneyTypeId")
|
||||
rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney2_clause>', ",t.tourneyTypeId")
|
||||
rebuild_sql_tourney = self.sql.query['rebuildHudCache'].replace('<tourney_insert_clause>', ",tourneyTypeId")
|
||||
rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney_select_clause>', ",t.tourneyTypeId")
|
||||
rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney_join_clause>', """INNER JOIN TourneysPlayers tp ON (tp.id = hp.tourneysPlayersId)
|
||||
INNER JOIN Tourneys t ON (t.id = tp.tourneyId)""")
|
||||
rebuild_sql_tourney = rebuild_sql_tourney.replace('<tourney_group_clause>', ",t.tourneyTypeId")
|
||||
rebuild_sql_tourney = rebuild_sql_tourney.replace('<where_clause>', where)
|
||||
#print "rebuild_sql_tourney:",rebuild_sql_tourney
|
||||
print "rebuild_sql_tourney:",rebuild_sql_tourney
|
||||
|
||||
self.get_cursor().execute(rebuild_sql_tourney)
|
||||
self.commit()
|
||||
|
|
|
@ -2990,7 +2990,7 @@ class Sql:
|
|||
,playerId
|
||||
,activeSeats
|
||||
,position
|
||||
<tourney1_clause>
|
||||
<tourney_insert_clause>
|
||||
,styleKey
|
||||
,HDs
|
||||
,wonWhenSeenStreet1
|
||||
|
@ -3080,7 +3080,7 @@ class Sql:
|
|||
when hp.position = '9' then 'E'
|
||||
else 'E'
|
||||
end AS hc_position
|
||||
<tourney2_clause>
|
||||
<tourney_select_clause>
|
||||
,date_format(h.startTime, 'd%y%m%d')
|
||||
,count(1)
|
||||
,sum(wonWhenSeenStreet1)
|
||||
|
@ -3346,7 +3346,7 @@ class Sql:
|
|||
,playerId
|
||||
,activeSeats
|
||||
,position
|
||||
<tourney1_clause>
|
||||
<tourney_insert_clause>
|
||||
,styleKey
|
||||
,HDs
|
||||
,wonWhenSeenStreet1
|
||||
|
@ -3436,7 +3436,7 @@ class Sql:
|
|||
when hp.position = '9' then 'E'
|
||||
else 'E'
|
||||
end AS hc_position
|
||||
<tourney2_clause>
|
||||
<tourney_select_clause>
|
||||
,'d' || substr(strftime('%Y%m%d', h.startTime),3,7)
|
||||
,count(1)
|
||||
,sum(wonWhenSeenStreet1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user