mpollmeier / gremlin-scala

[unmaintained] Scala wrapper for Apache TinkerPop 3 Graph DSL
Apache License 2.0
481 stars 75 forks source link

how to Commit graph data #29

Closed davidseth closed 10 years ago

davidseth commented 10 years ago

How do you do a graph.Commit() of the graph data? There is no commit method on the ScalaGraph, just shutdown. Thanks in advance, and thanks for this library :)

joan38 commented 10 years ago

Hi davidseth,

You probably miss used the wrapper. You should just import wrappers and let implicits call new ScalaGraph.

import com.tinkerpop.gremlin.scala._
val graph = new TinkerGraph or TitanGraph or Neo4j2Graph
graph.V.has(...)...
graph.commit()

Also it is not possible to implement .commit() directly on ScalaGraph since this is not a part of the Graph interface but TransactionalGraph which is not implemented by all graphs. For example TinkerGraph because it's is a in memory DB with no transactional feature.

davidseth commented 10 years ago

Great, thanks. I understand now. Really appreciate the quick answer :)