record HC.TTid on pgsql

This commit is contained in:
steffen123 2010-08-11 04:39:34 +02:00
parent 02b5ea8d37
commit f1ac0b1dfa
2 changed files with 5 additions and 1 deletions

View File

@ -1474,7 +1474,7 @@ class Database:
INNER JOIN Tourneys t ON (t.id = tp.tourneyId)""") 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('<tourney_group_clause>', ",t.tourneyTypeId")
rebuild_sql_tourney = rebuild_sql_tourney.replace('<where_clause>', where) 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.get_cursor().execute(rebuild_sql_tourney)
self.commit() self.commit()

View File

@ -3170,6 +3170,7 @@ class Sql:
,playerId ,playerId
,activeSeats ,activeSeats
,position ,position
<tourney_insert_clause>
,styleKey ,styleKey
,HDs ,HDs
,wonWhenSeenStreet1 ,wonWhenSeenStreet1
@ -3259,6 +3260,7 @@ class Sql:
when hp.position = '9' then 'E' when hp.position = '9' then 'E'
else 'E' else 'E'
end AS hc_position end AS hc_position
<tourney_select_clause>
,'d' || to_char(h.startTime, 'YYMMDD') ,'d' || to_char(h.startTime, 'YYMMDD')
,count(1) ,count(1)
,sum(wonWhenSeenStreet1) ,sum(wonWhenSeenStreet1)
@ -3332,11 +3334,13 @@ class Sql:
,sum(CAST(hp.street4Raises as integer)) ,sum(CAST(hp.street4Raises as integer))
FROM HandsPlayers hp FROM HandsPlayers hp
INNER JOIN Hands h ON (h.id = hp.handId) INNER JOIN Hands h ON (h.id = hp.handId)
<tourney_join_clause>
<where_clause> <where_clause>
GROUP BY h.gametypeId GROUP BY h.gametypeId
,hp.playerId ,hp.playerId
,h.seats ,h.seats
,hc_position ,hc_position
<tourney_group_clause>
,to_char(h.startTime, 'YYMMDD') ,to_char(h.startTime, 'YYMMDD')
""" """
else: # assume sqlite else: # assume sqlite