예제 #1
0
 def get_tems_by_author(authorId):
     teamsCursor = Database.find("teams", {"authorId": authorId})
     return [team for team in teamsCursor]
예제 #2
0
 def get_boards_by_author(cls, authorId):
     cursorBoards = Database.find('boards', {'authorId': authorId})
     return [board for board in cursorBoards]
예제 #3
0
 def get_for_board(boardId):
     ### check if boardId exist
     cursor = Database.find(Log.collection, {'boardId': boardId})
     return [c for c in cursor]
예제 #4
0
 def get_for_user(userId):
     ### check if userId exist
     cursor = Database.find(Log.collection, {'userId': userId})
     return [c for c in cursor]
예제 #5
0
 def get_comments_for_card(cardId):
     cursors = Database.find('comments', {'forCard': cardId})
     return [c for c in cursors]
예제 #6
0
 def get_all_lists_releted_to_board(cls, boardId):
     cursorLists = Database.find('lists', {"forBoard": boardId})
     return [list for list in cursorLists], [cls(**list) for list in cursorLists]
예제 #7
0
 def get_card_by_boardId(boardId):
     cursors = Database.find('cards', {'boardId': boardId})
     return [c for c in cursors]