From 6104a59cbdf6474acea6a8a1d4c865f3d88d2296 Mon Sep 17 00:00:00 2001 From: Debulois Date: Sun, 24 Apr 2022 17:16:05 +0200 Subject: Mise en place du système de connexion / enregistrement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/database/dbsearch.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/database/dbsearch.py') diff --git a/src/database/dbsearch.py b/src/database/dbsearch.py index 15d4a24..3089bf1 100644 --- a/src/database/dbsearch.py +++ b/src/database/dbsearch.py @@ -9,7 +9,7 @@ # https:#www.freecodecamp.org/news/sql-joins-tutorial/ # Import de dbmain -from . import dbmain +from src.database import dbmain # Extension de cette classe avec dbmain @@ -18,7 +18,7 @@ class DbSearch(dbmain.DbMain): # RECUPERATION DES INFORMATIONS RELATIVES AUX UTILISATEURS # **************************************************************************** # Récupération des infos d'un compte par son id - def get_user_account_by_userid(self, userId): + def get_user_account_by_userid(self, userId: int) -> list: reqSearchUser = """ SELECT userId, email, inscriptionDate, userStatus @@ -30,7 +30,7 @@ class DbSearch(dbmain.DbMain): return self.cur.fetchall() # Récupération des infos d'un utilisateur par son id - def get_user_info_by_userid(self, userId): + def get_user_info_by_userid(self, userId: int) -> list: reqGetUserInfo = """ SELECT userId, lastname, firstname, degree, @@ -118,7 +118,7 @@ class DbSearch(dbmain.DbMain): # RECUPERATION DES INFORMATIONS RELATIVES AUX EMPLOIS # **************************************************************************** # Récupérer toutes les infos de la table jobCategory - def get_job_all(self): + def get_job_all(self) -> list: reqGetAllJobs = """ SELECT * @@ -128,7 +128,7 @@ class DbSearch(dbmain.DbMain): return self.cur.fetchall() # Récupérer toutes les infos de la table jobCategory - def get_job_by_jobid(self, jobId): + def get_job_by_jobid(self, jobId: int) -> list: reqGetJobinfo = """ SELECT * -- cgit v1.2.3