From f25e524c064b03c3e93f7f22a21e72075152b05a Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 3 Dec 2008 17:37:31 +0900 Subject: [PATCH] Add sqlcoders indexes to query file --- pyfpdb/FpdbSQLQueries.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/pyfpdb/FpdbSQLQueries.py b/pyfpdb/FpdbSQLQueries.py index acebca04..127d3146 100644 --- a/pyfpdb/FpdbSQLQueries.py +++ b/pyfpdb/FpdbSQLQueries.py @@ -573,6 +573,29 @@ class FpdbSQLQueries: elif(self.dbname == 'SQLite'): self.query['createHudCacheTable'] = """ """ + if(self.dbname == 'MySQL InnoDB'): + self.query['addTourneyIndex'] = """ALTER TABLE Tourneys ADD INDEX 'siteTourneyNo'('siteTourneyNo')""" + elif(self.dbname == 'PostgreSQL'): + # FIXME: This query has a different syntax + self.query['addTourneyIndex'] = """ALTER TABLE Tourneys ADD INDEX 'siteTourneyNo'('siteTourneyNo')""" + elif(self.dbname == 'SQLite'): + + if(self.dbname == 'MySQL InnoDB'): + self.query['addHandsIndex'] = """ALTER TABLE Hands ADD INDEX 'siteHandNo'('siteHandNo')""" + elif(self.dbname == 'PostgreSQL'): + # FIXME: This query has a different syntax + self.query['addHandsIndex'] = """ALTER TABLE Hands ADD INDEX 'siteHandNo'('siteHandNo')""" + elif(self.dbname == 'SQLite'): + self.query['addHandsIndex'] = """ """ + + if(self.dbname == 'MySQL InnoDB'): + self.query['addPlayersIndex'] = """ALTER TABLE Players ADD INDEX 'name'('name')""" + elif(self.dbname == 'PostgreSQL'): + # FIXME: This query has a different syntax + self.query['addHandsIndex'] = """ALTER TABLE Hands ADD INDEX 'siteHandNo'('siteHandNo')""" + elif(self.dbname == 'SQLite'): + self.query['addHandsIndex'] = """ """ + ################################ # Queries used in GuiGraphViewer ################################