[Neo4j] Neo4jRestNet Update

Tatham Oddie tatham at oddie.com.au
Fri Oct 21 07:36:36 CEST 2011

Hi Kan,

FYI - we added parametized Gremlin queries in our implementation and have seen a nice memory heap improvement on the Java side as a result.

That is ... instead of:


we send:

  query: 'g.v(p0).outE[[label:p1]]',
  params: {
    p0: 123,
    p1: 'FOO'

This allows the query to be cached by neo4j and then just called with different parameters later.

-- Tatham

-----Original Message-----
From: user-bounces at lists.neo4j.org [mailto:user-bounces at lists.neo4j.org] On Behalf Of KanTube
Sent: Thursday, 20 October 2011 9:36 AM
To: user at lists.neo4j.org
Subject: [Neo4j] Neo4jRestNet Update


I updated my .Net wrapper

you can now use LINQ on the flilter and sort commands for example

Node MyNode = Node.GetNode(123);
GremlinScript script = new GremlinScript(MyNode)
	.Filter(it => it.GetProperty("MyProp").ToLowerCase() == "TestValue" ||

IEnumerable<Node> ReturnNodes = Gremlin.Post<Node>(script);

You can also return a DataTable 

GremlinScript script = new GremlinScript();
	.NodeIndexLookup(new Dictionary<string, object>() { { "FirstName" , "Jack"
}, { "LastName", "Shaw" } })
	.Filter(it => it.GetProperty("UID") == "jshaw") 
	.Table("t", "UserNode", "LikeRel", "FriendNode")
	.Append("{{it}}{{it.getProperty('{0}')}}{{it.getProperty('{1}')}} >> -1; t","Date", "FirstName");

DataTable tbl = Gremlin.GetTable(script);

The above table example will submit the following Gremlin script to Neo4j:

t = new Table();
	.filter{it.getProperty('UID') == 'jshaw'}
>> -1; t");

And the returned table will have column names of "UserNode", "LikeRel", "FriendNode" with typed values of Node, DateTime, string (assuming the properties are stored with the correct types)

View this message in context: http://neo4j-community-discussions.438527.n3.nabble.com/Neo4jRestNet-Update-tp3436032p3436032.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
Neo4j mailing list
User at lists.neo4j.org

More information about the User mailing list