Ejemplo n.º 1
0
 public static HttpStatusCode GetPropertyOnRelationship(string dbUrl, long relationshipId, string propertyName, out string response)
 {
     return
         (HttpRest.Get(
              string.Concat(Connection.GetServiceRoot(dbUrl).Relationship, "/", relationshipId.ToString(), "/properties/", propertyName),
              out response));
 }
Ejemplo n.º 2
0
        public static HttpStatusCode GetRelationshipsOnNode(string dbUrl, long nodeId, RelationshipDirection direction, IEnumerable <string> relationships, out string response)
        {
            if (direction == null)
            {
                direction = RelationshipDirection.All;
            }

            if (relationships == null || !relationships.Any())
            {
                return
                    (HttpRest.Get(
                         string.Concat(Connection.GetServiceRoot(dbUrl).Node, "/", nodeId.ToString(), "/relationships/", direction.ToString()),
                         out response));
            }

            return
                (HttpRest.Get(
                     string.Concat(Connection.GetServiceRoot(dbUrl).Node, "/", nodeId.ToString(), "/relationships/", direction.ToString(), "/",
                                   string.Join("&", relationships)), out response));
        }
Ejemplo n.º 3
0
 public static HttpStatusCode GetPropertiesOnNode(string dbUrl, long nodeId, out string response)
 {
     return(HttpRest.Get(string.Concat(Connection.GetServiceRoot(dbUrl).Node, "/", nodeId.ToString(), "/properties"), out response));
 }
Ejemplo n.º 4
0
 public static HttpStatusCode GetRelationship(string dbUrl, string indexName, string searchQuery, out string response)
 {
     return(HttpRest.Get(string.Concat(Connection.GetServiceRoot(dbUrl).RelationshipIndex, "/", indexName, "?query=", Uri.EscapeDataString(searchQuery)), out response));
 }
Ejemplo n.º 5
0
        public static HttpStatusCode GetRelationship(string dbUrl, string indexName, string key, object value, out string response)
        {
            var strValue = value is string?Uri.EscapeDataString(value.ToString()) : value.ToString();

            return(HttpRest.Get(string.Concat(Connection.GetServiceRoot(dbUrl).RelationshipIndex, "/", indexName, "/", key, "/", strValue), out response));
        }
Ejemplo n.º 6
0
 public static HttpStatusCode GetRelationship(string dbUrl, long id, out string response)
 {
     return(HttpRest.Get(string.Concat(Connection.GetServiceRoot(dbUrl).Relationship, "/", id), out response));
 }
Ejemplo n.º 7
0
 public static HttpStatusCode ListRelationshipIndexes(string dbUrl, out string response)
 {
     return(HttpRest.Get(Connection.GetServiceRoot(dbUrl).RelationshipIndex, out response));
 }
Ejemplo n.º 8
0
 public static HttpStatusCode GetRoot(string dbUrl, out string response)
 {
     return(HttpRest.Get(dbUrl, out response));
 }