From 5a2fcea9dfc3dad5e0039640e74454659e70e022 Mon Sep 17 00:00:00 2001 From: Chaz Date: Thu, 2 Dec 2010 00:27:03 -0500 Subject: [PATCH 1/4] turns out the the '+0' is for indexing and has nothing to do with NULLS so I put it back in --- pyfpdb/SQL.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index 1f91e822..1b6a9f4c 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -3964,12 +3964,12 @@ class Sql: street2Raises=street2Raises+%s, street3Raises=street3Raises+%s, street4Raises=street4Raises+%s - WHERE gametypeId=%s + WHERE gametypeId+0=%s AND playerId=%s AND activeSeats=%s AND position=%s AND (case when tourneyTypeId is NULL then 1 else - (case when tourneyTypeId=%s then 1 else 0 end) end)=1 + (case when tourneyTypeId+0=%s then 1 else 0 end) end)=1 AND styleKey=%s""" self.query['get_hero_hudcache_start'] = """select min(hc.styleKey) From cbd6aa242e43076bcef2fb1206fef3248da97be0 Mon Sep 17 00:00:00 2001 From: Chaz Date: Thu, 2 Dec 2010 00:35:18 -0500 Subject: [PATCH 2/4] Added the 'cacheSessions' config option --- pyfpdb/Configuration.py | 6 +++++- pyfpdb/HUD_config.test.xml | 2 +- pyfpdb/HUD_config.xml.example | 2 +- pyfpdb/fpdb_import.py | 4 ++++ 4 files changed, 11 insertions(+), 3 deletions(-) mode change 100755 => 100644 pyfpdb/fpdb_import.py diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 4e01b796..ed12f7a4 100644 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -479,12 +479,13 @@ class Import: self.hhArchiveBase = node.getAttribute("hhArchiveBase") self.hhBulkPath = node.getAttribute("hhBulkPath") self.saveActions = string_to_bool(node.getAttribute("saveActions"), default=False) + self.cacheSessions = string_to_bool(node.getAttribute("cacheSessions"), default=False) self.fastStoreHudCache = string_to_bool(node.getAttribute("fastStoreHudCache"), default=False) self.saveStarsHH = string_to_bool(node.getAttribute("saveStarsHH"), default=False) def __str__(self): return " interval = %s\n callFpdbHud = %s\n hhArchiveBase = %s\n saveActions = %s\n fastStoreHudCache = %s\n" \ - % (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.fastStoreHudCache) + % (self.interval, self.callFpdbHud, self.hhArchiveBase, self.saveActions, self.cacheSessions, self.fastStoreHudCache) class HudUI: def __init__(self, node): @@ -1259,6 +1260,9 @@ class Config: try: imp['saveActions'] = self.imp.saveActions except: imp['saveActions'] = False + + try: imp['cacheSessions'] = self.imp.cacheSessions + except: imp['cacheSessions'] = False try: imp['saveStarsHH'] = self.imp.saveStarsHH except: imp['saveStarsHH'] = False diff --git a/pyfpdb/HUD_config.test.xml b/pyfpdb/HUD_config.test.xml index 556bbede..964be208 100644 --- a/pyfpdb/HUD_config.test.xml +++ b/pyfpdb/HUD_config.test.xml @@ -2,7 +2,7 @@ - +