g.addV('person').property('name','stephen')
GraphStatement statement;
GraphResultSet grs;
for (int i=0; i<keys.size(); i++) {
statement = DseGraph.statementFromTraversal(g.V().has("name","homesh").property(keys.get(i), values.get(i)));
grs = session.executeGraph(statement);
}
Hi ,I need to create a vertex with different properties and each property may have a different data type.I checked tinkerpop's documentation and I could see that to add properties, we can pass only two methods key and value in the property method.
g.addV('person').property('name','stephen')However, in my use case I want to add multiple properties with different datatype at once. As of now I am looping on the key array and for every key executing the statement. But I don't believe this is the optimum way to do this.
GraphStatement statement;
GraphResultSet grs;
for (int i=; i<keys.size(); i++) {
statement = DseGraph.statementFromTraversal(g.V().has("name","homesh").property(keys.get(i), values.get(i)));
grs = session.executeGraph(statement);}
Can you please suggest me what is the better way to do this.--Homesh
--
You received this message because you are subscribed to the Google Groups "DataStax Java Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-user+unsubscribe@lists.datastax.com.