Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
BIN presentation/A Programmatic Introduction to Neo4j.pptx
Binary file not shown.
View
29 src/koan/java/org/neo4j/tutorial/Koan08a.java
@@ -77,35 +77,6 @@ public void shouldCountTheNumberOfEpisodes()
assertEquals(246l, result.javaColumnAs("count(episodes)").next());
}
- @Test
- public void shouldSizeTheDoctorWhoDataset()
- {
- // The Java APIs make it quite easy to brute force count nodes and relationships
- // But as of Neo4j 1.7, Cypher can do it too...
-
- ExecutionEngine engine = new ExecutionEngine(universe.getDatabase());
- String cqlNodes = null;
- String cqlRels = null;
- long items = 0;
-
- // YOUR CODE GOES HERE
- // SNIPPET_START
-
- cqlNodes = "start nodes=node(*) "//, r=relationship(*) "
- + "return count(nodes)";
-
- cqlRels = "start rels=relationship(*) "
- + "return count(rels)";
-
- // SNIPPET_END
- ExecutionResult nodesResult = engine.execute(cqlNodes);
- items += ((Long)nodesResult .javaColumnAs("count(nodes)").next()).longValue();
-
- ExecutionResult relsResult = engine.execute(cqlRels);
- items += ((Long)relsResult.javaColumnAs("count(rels)").next()).longValue();
-
- assertEquals(3354, items);
- }
@Test
public void shouldFindAllTheEpisodesInWhichTheCybermenAppeared() throws Exception
View
2 src/koan/java/org/neo4j/tutorial/Koan08b.java
@@ -25,13 +25,11 @@
public class Koan08b
{
private static EmbeddedDoctorWhoUniverse universe;
- private static DatabaseHelper databaseHelper;
@BeforeClass
public static void createDatabase() throws Exception
{
universe = new EmbeddedDoctorWhoUniverse(new DoctorWhoUniverseGenerator());
- databaseHelper = new DatabaseHelper(universe.getDatabase());
}
@AfterClass

No commit comments for this range

Something went wrong with that request. Please try again.