-
Notifications
You must be signed in to change notification settings - Fork 22
Initial support for RedisGraph 1.0.0 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| ResultSet result = api.query("CREATE ({name:\"roi\",age:32})"); | ||
| Assert.assertFalse(result.hasNext()); | ||
|
|
||
| Assert.assertEquals("1", result.getStatistics().getStringValue(Label.NODES_CREATED)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do result.getStatistics().nodesCreated() ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@swilly22 Added accessors
| ResultSet createResult2 = api.query("CREATE (:person{name:'amit',age:30})"); | ||
|
|
||
| // Connect source and destination nodes. | ||
| ResultSet matchResult = api.query("MATCH (a:person), (b:person) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[knows]->(a)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename matchResult, maybe resultset ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just following the rest of the results sets naming according to the query running
| ResultSet create2Result = api.query("CREATE (:qhuman{name:'amit',age:30})"); | ||
|
|
||
| // Connect source and destination nodes. | ||
| ResultSet connectResult= api.query("MATCH (a:qhuman), (b:qhuman) WHERE (a.name = 'roi' AND b.name='amit') CREATE (a)-[knows]->(b)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's a qhuman, can't we simply use human?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the original tests, and since we don't really have Graph drop implementation I want to use different keys
| Assert.assertNotNull(resultSet.getStatistics().getStringValue(Label.QUERY_INTERNAL_EXECUTION_TIME)); | ||
|
|
||
| Record record = resultSet.next(); | ||
| Assert.assertEquals( "roi", record.getString(1)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't assume order, position 1 for name, position 0 for age,
unless you specify the order of return attributes.
Use getString("name") and getString("age")
No description provided.