Skip to content

Conversation

@DvirDukhan
Copy link
Contributor

@DvirDukhan DvirDukhan commented May 6, 2019

DO NOT MERGE!
Modified to new resultset structure
version moved to 2.0.0-snapshot

@DvirDukhan DvirDukhan requested review from gkorland and swilly22 May 6, 2019 11:29
* @return a result set
*/
public ResultSet query(String query, Object ...args) {
StringBuilder sb = new StringBuilder();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sb dead code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@gkorland
Copy link
Contributor

gkorland commented May 7, 2019

@DvirDukhan notice some of the tests failed on CI

@codecov-io
Copy link

codecov-io commented May 15, 2019

Codecov Report

Merging #35 into master will decrease coverage by 29.66%.
The diff coverage is 63.11%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #35       +/-   ##
===========================================
- Coverage   94.91%   65.25%   -29.67%     
===========================================
  Files           6       16       +10     
  Lines         118      400      +282     
  Branches       17       68       +51     
===========================================
+ Hits          112      261      +149     
- Misses          1      113      +112     
- Partials        5       26       +21
Impacted Files Coverage Δ
...java/com/redislabs/redisgraph/impl/RecordImpl.java 31.81% <0%> (-68.19%) ⬇️
src/main/java/com/redislabs/redisgraph/Utils.java 0% <0%> (ø)
src/main/java/com/redislabs/redisgraph/Header.java 100% <100%> (ø)
.../com/redislabs/redisgraph/impl/GraphCacheList.java 100% <100%> (ø)
...java/com/redislabs/redisgraph/impl/GraphCache.java 100% <100%> (ø)
.../main/java/com/redislabs/redisgraph/ResultSet.java 100% <100%> (ø)
.../main/java/com/redislabs/redisgraph/impl/Edge.java 32% <32%> (ø)
...ava/com/redislabs/redisgraph/impl/GraphEntity.java 37.5% <37.5%> (ø)
.../com/redislabs/redisgraph/impl/StatisticsImpl.java 58.82% <37.5%> (-37.18%) ⬇️
.../main/java/com/redislabs/redisgraph/impl/Node.java 40% <40%> (ø)
... and 16 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 5b7d416...f3ee260. Read the comment docs.

* @param graphId a graph to perform the query on
* @param procedure - procedure to execute
* @param args - procedure arguments
* @param kwargs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JDoc?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

*/
private void getProcedureInfo() {
ResultSet resultSet = redisGraph.callProcedure(graphId, procedure);
this.clear();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why clear? shouldn't we just add?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* @param index index of data item
* @return The string value of the specific procedure response, at the given index.
*/
public String getCachedData(int index) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, but just an idea...

    public String getCachedData(int index) {

        String s;
        try {
            s = data.get(index);
        } catch (IndexOutOfBoundsException e){
              synchronized (mutex){
                  if (index >= data.size()) {
                      getProcedureInfo();
                  }
              }
              s = data.get(index);
        }
        return s;
     }

gkorland
gkorland previously approved these changes May 16, 2019
gkorland
gkorland previously approved these changes May 16, 2019
gkorland
gkorland previously approved these changes May 19, 2019
gkorland
gkorland previously approved these changes May 28, 2019
@DvirDukhan DvirDukhan merged commit 4eadb76 into master May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants