Esempio n. 1
0
 def runQuerySeasonTeamCategory(self, season, team, force):
     query_file_path = os.getcwd() + '/db/' + inspect.stack()[1][3] + '.sql'
     file = open(query_file_path, 'r')
     query_sentence = file.read()
     return dbtool.executeQueryFirst(
         self._db, query_sentence,
         [season, "%" + team + "%", season, "%" + team + "%"])
Esempio n. 2
0
    def getTotalGoalsConcededAway(self, team):
        query = 'select sum(home_score), count(*) from MATCH, TEAM \
                where MATCH.away_id = TEAM.team_id and TEAM.name like ?'

        return dbtool.executeQueryFirst(self._db, query, ['%' + team + '%'])
Esempio n. 3
0
 def queryPerformance(self, team):
     query_sentence = self.readQuery()
     return dbtool.executeQueryFirst(self._db, query_sentence,
                                     ["%" + team + "%", "%" + team + "%"])
Esempio n. 4
0
 def queryGoalMinute(self, season, team, m_from, m_to):
     query_sentence = self.readQuery()
     return dbtool.executeQueryFirst(
         self._db, query_sentence,
         [season, "%" + team + "%", m_from, m_to, season, "%" + team + "%"])
Esempio n. 5
0
 def queryOver25Category(self, season, team, force):
     query_sentence = self.readQuery()
     return dbtool.executeQueryFirst(
         self._db, query_sentence,
         [force, force, season, "%" + team + "%", season, "%" + team + "%"])