RoomRepository module¶
-
class
repositories.room_repository.
RoomRepository
(db_name: str = 'concord.db')¶ Bases:
repositories.repository_interface.RepositoryInterface
-
delete_by_id
(room_id: str) → bool¶ Deletes an object containing the subject_id and returns whether the operation was successful or not
- Parameters
subject_id – the subject identification code
- Returns
any
-
find_all_by_id
(room_id: str) → Tuple[List[dtos.dto_room.Room], bool]¶ Finds all objects containing the subject_id and returns them
- Parameters
subject_id – the subject identification code
- Returns
any
-
find_by_id
(room_id: str) → Tuple[dtos.dto_room.Room, bool]¶ Finds an object containing the subject_id and returns it
- Parameters
subject_id – the subject identification code
- Returns
any
-
get_all_rooms
() → Tuple[List[dtos.dto_room.Room], bool]¶
-
put
(room: dtos.dto_room.Room) → bool¶ Puts an object on the database
- Parameters
subject – the subject to be stored on the database
- Returns
any
-
update_by_id
(room_id: str, new_data: dtos.dto_room.Room) → bool¶ Updates an object containing the subject_id and returns it
- Parameters
subject_id – the subject identification code
new_subject_data – the new subject data
- Returns
any
-