Exemplo 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 + "%"])
Exemplo 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 + '%'])
Exemplo n.º 3
0
 def queryPerformance(self, team):
     query_sentence = self.readQuery()
     return dbtool.executeQueryFirst(self._db, query_sentence,
                                     ["%" + team + "%", "%" + team + "%"])
Exemplo 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 + "%"])
Exemplo 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 + "%"])