Skip to content

Conversation

@scottinet
Copy link
Contributor

@scottinet scottinet commented Dec 18, 2017

  • DRY-ify the construction of SearchResult instances: it's now up to this class to build itself from Kuzzle API results
  • remove the need of providing a previous SearchResult instance to the SearchResult constructor: the fetchNext method is now in charge of updating the next SearchResult instance with the relevant information (namely, how many documents have been fetched so far)
  • rename the fetchedDocument property into fetched
  • fix the creation of the search_after filter configuration, derivated from the sort filter property, which may contain either an object or a string (only the object kind of property was handled)

Boyscout: covnerted SearchResult implementation to ES6

@codecov-io
Copy link

codecov-io commented Dec 18, 2017

Codecov Report

Merging #267 into 6.x will decrease coverage by 84.71%.
The diff coverage is 64.44%.

Impacted file tree graph

@@             Coverage Diff             @@
##              6.x     #267       +/-   ##
===========================================
- Coverage   98.46%   13.74%   -84.72%     
===========================================
  Files          17       17               
  Lines        2079     2045       -34     
  Branches      604      595        -9     
===========================================
- Hits         2047      281     -1766     
- Misses         32     1764     +1732
Impacted Files Coverage Δ
src/Collection.js 11.85% <0%> (-88.15%) ⬇️
src/SearchResult.js 68.18% <69.04%> (-26.82%) ⬇️
src/Room.js 2.06% <0%> (-97.94%) ⬇️
src/networkWrapper/protocols/socketio.js 3.44% <0%> (-91.38%) ⬇️
src/Kuzzle.js 7.97% <0%> (-89.88%) ⬇️
src/security/SecurityDocument.js 12.24% <0%> (-87.76%) ⬇️
src/security/Security.js 11.14% <0%> (-86.58%) ⬇️
src/networkWrapper/protocols/abstract/realtime.js 12.92% <0%> (-85.72%) ⬇️
src/CollectionMapping.js 12.19% <0%> (-85.37%) ⬇️
src/networkWrapper/protocols/websocket.js 15.68% <0%> (-84.32%) ⬇️
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28a9beb...2886d84. Read the comment docs.

@ballinette ballinette merged commit e88f328 into 6.x Dec 19, 2017
@ballinette ballinette deleted the update_searchresult_api branch December 19, 2017 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants