Changeset - 071f264dfb0c
[Not reviewed]
default
0 2 0
Laman - 7 years ago 2018-05-04 12:19:16

fix: pamatujeme si poslední jméno hráče místo prvního
2 files changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
egd.py
Show inline comments
 
@@ -79,20 +79,20 @@ def setupDB():
 
def fillDB(tournaments,players):
 
	cursor=connection.cursor()
 

	
 
	cursor.execute("""delete from players_performance""")
 
	cursor.execute("""delete from players""")
 
	cursor.execute("""delete from tournaments""")
 

	
 
	cursor.executemany(
 
		"""insert into tournaments (code,datum,class,round_count,player_count,country_code,description) values (:code,:date,:class,:roundCount,:playerCount,:countryCode,:description)""",
 
		tournaments.values()
 
	)
 

	
 
	cursor.executemany("""insert or ignore into players (pin,name) values (:pin,:name)""", players)
 
	cursor.executemany("""insert or replace into players (pin,name) values (:pin,:name)""", players)
 

	
 
	cursor.executemany(
 
		"""insert into players_performance (pin,tournament_code,country_code,club,win_count,game_count,rating_before,rating_after) values (:pin,:tournamentCode,:countryCode,:club,:winCount,:gameCount,:rating1,:rating2)""",
 
		players
 
	)
 

	
 
	connection.commit()
readme.md
Show inline comments
 
@@ -16,29 +16,31 @@ Uložené dotazy.
 
* (text) class
 
* (integer) round_count
 
* (integer) player_count
 
* (text) country_code
 
* (text) description
 

	
 
### players
 
* (integer) pin
 
* (text) name
 

	
 
### players_performance
 
Co se vztahuje zároveň k hráči a k turnaji. Většina položek all.hst.
 

	
 
* (integer) pin
 
* (text) tournament_code
 
* (text) country_code
 
* (text) club
 
* (integer) win_count
 
* (integer) game_count
 
* (real) rating_before
 
* (real) rating_after
 

	
 
### players_performance_tournaments
 
Pohled na tournaments a players_performance.
 

	
 
* (integer) pin
 
* (text) p_country_code - země hráče
 
* (real) rating_before
 
* (real) rating_after
 
* (text) t_country_code - lokace turnaje
 
* (text) datum
0 comments (0 inline, 0 general)