Guest User

Untitled

a guest
Feb 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. DataMapper#Collection
  2. repository
  3. # a note on collection/repository association would be
  4. # helpful
  5.  
  6. load
  7. # is load lazy?
  8.  
  9. reload
  10. # when query argument may be helpful?
  11.  
  12. get
  13. # can we use multiple keys?
  14. # how cache is organized? are queries cached or what?
  15. # how model/query/repository/key are all associated in the code?
  16.  
  17. get!
  18. # is ok
  19.  
  20. all
  21. # how efficient is it? is it scary just like AR's?
  22. # one can NOT chain all calls: @post.comments.all(...).all(...)
  23.  
  24. first
  25. # # TODO: this shouldn't be a kicker if scoped_query() is called is
  26. # unclear
  27.  
  28. last
  29. # how efficient is current implementation?
  30.  
  31. at
  32. # does load unless objecs are loaded: need to stress this
  33.  
  34. slice
  35. # can we use #to_i on first argument and check for it? I mean
  36. # this: return at(args.first) if args.size == 1 && args.first.kind_of?(Integer)
  37. # alias [] needs to be mentioned
  38.  
  39. reverse
  40. # how efficient is it?
  41.  
  42. <<
  43. # operates on a single element
  44.  
  45. push
  46. # operates on multiple elements
  47.  
  48. unshift
  49. # operates on multiple elements
  50.  
  51. replace
  52. # idea of orphaned resources needs to be briefly described
  53.  
  54. pop
  55. # ditto
  56.  
  57. shift
  58. # ditto
  59.  
  60. delete
  61. # ditto
  62.  
  63. delete_at
  64. # ditto
  65.  
  66. clear
  67. # ditto
  68.  
  69. build
  70. # does it return new object?
  71.  
  72. create
  73. # does it return created object?
  74.  
  75. update!
  76. # looks ok
  77.  
  78. destroy!
  79. # looks ok
  80.  
  81. properties
  82. # if it's public, when would I use it?
  83.  
  84. relationships
  85. # ditto
  86.  
  87. default_attributes
  88. # ditto
  89.  
  90. respond_to?
  91. # ditto
  92.  
  93. model
  94. # would be great to describe how it is used currently
  95.  
  96. initialize
  97. # public but misses docs
  98.  
  99. add
  100. # would be great to describe how it is used currently
  101.  
  102. relate_resource
  103. # would be great to describe how it is used currently
  104.  
  105. orphan_resource
  106. # would be great to describe how it is used currently
  107.  
  108. scoped_query
  109. # would be great to describe how it is used currently
  110.  
  111. keys
  112. # would be great to describe how it is used currently
  113.  
  114. identity_map
  115. # would be great to describe how it is used currently
  116. # delegates to repository's IM: mention this
  117.  
  118. set_relative_position
  119. # would be great to describe how it is used currently
  120.  
  121. method_missing
  122. # would be great to describe how it is used currently
Add Comment
Please, Sign In to add comment