コード例 #1
0
 /* Get Data From Neo4j Server */
 public void GetAllDataFromServer()
 {
     NeoUnity.Neo4j.RootObject o = NeoUnity.Neo4j.Server.QueryObject("MATCH (n:" + Entity1_Str + ") -[r]- (b:" + Entity2_Str + ") return r,n,b");
     if (o.results.Count > 0)
     {
         GraphRenderer.Singleton.GetNeoData(o.results[0].data);
     }
 }
コード例 #2
0
 /* Get Data From Neo4j Server with Query String */
 public void GetDataFromServer()
 {
     if (QueryText.text == "*")
     {
         NeoUnity.Neo4j.RootObject o = NeoUnity.Neo4j.Server.QueryObject("MATCH (n:" + Entity1_Str + ") -[r]- (b:" + Entity2_Str + ") return r,n,b");
         if (o.results.Count > 0)
         {
             GraphRenderer.Singleton.GetNeoData(o.results[0].data);
         }
     }
     else
     {
         string q = "MATCH (n:" + Entity1_Str + ") -[r] - (b:" + Entity2_Str + ") WHERE (n.title =~'.*" + QueryText.text + "') OR (n.title =~'" + QueryText.text + ".*') OR (b.name =~'.*" + QueryText.text + "') OR (b.name =~'" + QueryText.text + ".*') RETURN n, r, b";
         NeoUnity.Neo4j.RootObject o = NeoUnity.Neo4j.Server.QueryObject(q);
         if (o.results.Count > 0)
         {
             GraphRenderer.Singleton.GetNeoData(o.results[0].data);
         }
     }
 }