[ 
https://issues.apache.org/jira/browse/TINKERPOP3-479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14715761#comment-14715761
 ] 

Daniel Kuppitz commented on TINKERPOP3-479:
-------------------------------------------

Others may not know what you're talking about.

here's the BulkLoader: 
https://github.com/apache/incubator-tinkerpop/tree/blvp/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/computer/bulkloading

It's work in progress and thus subject to a few more refactorings. But the key 
part is an interface with methods like this:

{code}
Vertex getOrCreateVertex(final Vertex vertex, final Graph graph, final 
GraphTraversalSource g)
{code}

> Consider Providing "getOrCreate" Functionality
> ----------------------------------------------
>
>                 Key: TINKERPOP3-479
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-479
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: structure
>    Affects Versions: 3.0.0-incubating
>            Reporter: stephen mallette
>             Fix For: 3.1.0-incubating
>
>
> One of the most commonly written functions used is good ol' "getOrCreate" 
> where you want to get a {{Vertex}} if it exists or create it with supplied 
> properties if it does not.  We currently have a "helper" function for this on 
> {{ElementHelper}} 
> https://github.com/tinkerpop/tinkerpop3/blob/6d0f00865f673cb0739f6f310e1868425f732924/gremlin-core/src/main/java/com/tinkerpop/gremlin/structure/util/ElementHelper.java#L62
> but perhaps it is time to treat this issue as a first class citizen as part 
> of the Graph API.  I think that some vendors might actually be able to 
> optimize this function as well.  
> Another aspect of "getOrCreate" is "upsert" as well as options to ensure 
> uniqueness.  All of these things we've at some point or another built 
> variations of outside of TinkerPop for applications, data loading, etc.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to