What is the difference between GraphDatabaseService or NeoService in neo4j

I learned to use neo4j , but got a little confused about its use. When I add nodes and relationships, I can do it like this:

GraphDatabaseService graphDb = new EmbeddedGraphDatabase("C:/temp/graphdb");
Transaction tx = graphDb.beginTx();
try {
  org.neo4j.graphdb.Node node = graphDb.createNode();
  ...

I could also do it like this:

NeoService neoService = new EmbeddedNeo("C:/temp/graphdb");
Transaction tx = neoService.beginTx();
try {
  org.neo4j.api.core.Node node = neoService.createNode();
  ...

What is the difference? Which one should I use? Why do they have two different mechanisms? Is this just an evolution of the API here? :) I want to use the MetaModel API and it needs a NeoService, so the choice is clear there, I think.

+3
source share
3 answers

, , 1.0-RC1 . , - . . ?

,

/peter neubauer

+5

API. API - NeoService, . . API ., , rc:

http://www.mail-archive.com/user@lists.neo4j.org/msg02378.html

(0.7-SNAPSHOT) , , API. 1.0 ( Real Soon Now:), , SNAPSHOT, , API.

-

+2

And for the metamodel, use the metamodel component (now using maven artifactId: neo4j-meta-model).

I also notice that the component review http://components.neo4j.org/neo4j-meta-model/ contains incorrect code and description examples. I will try to fix it.

+2
source

Source: https://habr.com/ru/post/1731153/


All Articles