Toggle navigation
Home
org.neo4j.bolt.v1.runtime.spi.RecordStream to org.neo4j.bolt.v1.runtime.spi.BoltResult
No. of Instances - 7
No. of Commits - 1
No. of Projects - {'neo4j'}
Hierarchy/Composition: SIBLING
Primitive Info: -
NameSpace: Internal -> Internal
Mapping:
Rename Method invocation
addRecords
to
onRecords
Rename Variable
record
to
result
recordStream
to
result
Cascading Type Change (Different)
TypeSafeMatcher<RecordStream>
to
TypeSafeMatcher<BoltResult>
RecordStream.Visitor
to
BoltResult.Visitor
Update Anonymous class
{ @Override protected boolean matchesSafely( RecordStream item){ if (!Arrays.equals(fieldNames,item.fieldNames())) { return false; } final Iterator<Matcher> expected=asList(records).iterator(); final AtomicBoolean matched=new AtomicBoolean(true); try { item.accept(new RecordStream.Visitor(){ @Override public void visit( Record record){ if (!expected.hasNext() || !expected.next().matches(record)) { matched.set(false); } } @Override public void addMetadata( String key, Object value){ } } ); } catch ( Exception e) { throw new RuntimeException(e); } return matched.get() && !expected.hasNext(); } @Override public void describeTo( Description description){ description.appendText("Stream[").appendValueList(" fieldNames=[",",","]",fieldNames).appendList(", records=[",",","]",asList(records)); } }
to
{ @Override protected boolean matchesSafely( BoltResult item){ if (!Arrays.equals(fieldNames,item.fieldNames())) { return false; } final Iterator<Matcher> expected=asList(records).iterator(); final AtomicBoolean matched=new AtomicBoolean(true); try { item.accept(new BoltResult.Visitor(){ @Override public void visit( Record record){ if (!expected.hasNext() || !expected.next().matches(record)) { matched.set(false); } } @Override public void addMetadata( String key, Object value){ } } ); } catch ( Exception e) { throw new RuntimeException(e); } return matched.get() && !expected.hasNext(); } @Override public void describeTo( Description description){ description.appendText("Stream[").appendValueList(" fieldNames=[",",","]",fieldNames).appendList(", records=[",",","]",asList(records)); } }