Advertisement
Guest User

Untitled

a guest
May 26th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. //collection 1
  2. game {
  3. // documents
  4. {
  5. _id: 1,
  6. shortName: "OOT",
  7. fullName: "Ocarina of Time",
  8. urlImage: "./oot.png"
  9. },
  10. {
  11. _id: 2,
  12. shortName: "BoTW",
  13. fullName: "Breath of the Wild",
  14. urlImage: "./botw.png"
  15. }
  16. ...
  17. }
  18.  
  19. //collection 2
  20. routes {
  21. // documents
  22. {
  23. _id: 1,
  24. routeName: "Some route on OOT - remember this name",
  25. gameID: 1,
  26. fastestTime: 1.24
  27. },
  28. {
  29. _id: 2,
  30. routeName: "Some SECOND route on OOT",
  31. gameID: 1,
  32. fastestTime: 1.31
  33. },{
  34. _id: 3,
  35. routeName: "Some route on a different game thats on OOT but it is also in the same collection, but it has a different game ID",
  36. gameID: 7,
  37. fastestTime: 1.24
  38. },
  39. ...
  40. }
  41.  
  42. //now I want to load the routes, all I need to do is filter the whole routes collection by {gameID:1} and you get all routes for OOT
  43.  
  44. //collection 3
  45. segments {
  46. // documents
  47. {
  48. _id: 1,
  49. segmentName: "Some segment on route: Some route on OOT - remember this name",
  50. routeID: 1,
  51. time: 1.24
  52. },
  53. {
  54. _id: 2,
  55. routeName: "Some SECOND segment the same route as above on OOT",
  56. routeID: 1,
  57. time: 1.55
  58. },{
  59. _id: 3,
  60. routeName: "Some segment from some other route, maybe even another game, but thats fine",
  61. routeID: 4,
  62. time: 1.55
  63. },
  64. ...
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement