Exemplo n.º 1
0
 def delete(self, id):
     execute_query(StudentQueries.delete(), (id,))
Exemplo n.º 2
0
 def get_all(self):
     rows = [row for row in execute_query(StudentQueries.get_all())]
     return rows
Exemplo n.º 3
0
 def insert(self, first_name, last_name, email):
     execute_query(StudentQueries.insert(), (first_name, last_name, email))
Exemplo n.º 4
0
 def update(self, id, first_name, last_name, email):
     execute_query(StudentQueries.update(), (first_name, last_name, email, id))
Exemplo n.º 5
0
 def insert(self, student_id, course_id):
     execute_query(StudentCourseQueries.insert(), (student_id, course_id))
Exemplo n.º 6
0
 def get_by_id(self, id):
     rows = [row for row in execute_query(StudentQueries.get_by_id(), (id,))]
     return rows
Exemplo n.º 7
0
 def insert(self, name, teacher_id):
     execute_query(CourseQueries.insert(), (name, teacher_id))
Exemplo n.º 8
0
 def get_all(self):
     rows = [row for row in execute_query(CourseQueries.get_all())]
     return rows
Exemplo n.º 9
0
 def get_all(self):
     rows = [row for row in execute_query(TeacherQueries.get_all())]
     return rows
Exemplo n.º 10
0
 def delete(self, id):
     execute_query(TeacherQueries.delete(), (id,))
Exemplo n.º 11
0
 def update(self, id, first_name, last_name, email):
     execute_query(TeacherQueries.update(), (first_name, last_name, email, id))
Exemplo n.º 12
0
 def insert(self, first_name, last_name, email):
     execute_query(TeacherQueries.insert(), (first_name, last_name, email))
Exemplo n.º 13
0
 def get_all_with_student_count(self):
     rows = [row for row in execute_query(TeacherQueries.get_all_with_student_count())]
     return rows