public virtual BaseEntity UpdateProperty(BaseEntity entity, string propertyToUpdate) { var uri = UriHelper.ConcatUri(entity.GetLocation(), "/properties"); var result = _graphRequest.Post(RequestType.PUT, uri, propertyToUpdate); return(entity); }
internal Index GetIndex(string indexName) { Index index = new Index(); index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/" + indexName)); return(index); }
public virtual BaseEntity SetProperty(BaseEntity entity, string propertyName) { var uri = UriHelper.ConcatUri(entity.GetLocation(), "/properties", propertyName); var result = _graphRequest.Post(RequestType.PUT, uri, string.Format(@"""{0}""", entity.GetProperty(propertyName))); return(entity); }
public RequestResult GetGermlinExecutionResult(Node node, string query) { query = query.Replace("#id", node.Id.ToString()); var uri = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/ext/GremlinPlugin/graphdb/execute_script"); var result = _graphRequest.Post(RequestType.POST, uri, query); return(result); }
public RequestResult GetRestExecutionResult(Node node, string query) { //Console.WriteLine(query); var uri = UriHelper.ConcatUri(node.GetLocation(), "/traverse/node"); var result = _graphRequest.Post(RequestType.POST, uri, query); return(result); }
public Node GetNode(string nodeId) { var uri = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/node/" + nodeId); Node node = new Node(); node.SetLocation(uri); return(this.GetNode(node)); }
internal Index GetAutoIndex() { Index index = new Index(); index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/auto/node")); return(index); }
public Node CreateNode(Node node) { var uri = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/node"); var result = _graphRequest.Post(RequestType.POST, uri, node.GetProperties()); node.SetLocation(result.GetLocation()); return(node); }
internal Index Create(string indexName) { JObject indexNameJson = new JObject(); indexNameJson.Add("name", new JValue(indexName)); Index index = new Index(); index.SetLocation(UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/" + indexName)); var response = _graphRequest.Post(RequestType.POST, UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/index/node/"), indexNameJson.ToString()); //Console.WriteLine(response.GetResponseData()); return(index); }
public Relationship GetRelationship(string relationShipId) { var uri = UriHelper.ConcatUri(GraphEnvironment.GetBaseUri(), "db/data/relationship/" + relationShipId); return(this.GetRelationship(uri)); }
internal RequestResult Search(Index indexToSearch, string searchQuery) { var response = _graphRequest.Post(RequestType.GET, UriHelper.ConcatUri(indexToSearch.GetLocation(), searchQuery), null); return(response); }