Beispiel #1
0
        protected internal virtual Request insertEdgeRequest <T>
            (T value, EdgeCreateOptions options)
        {
            Request request = new Request
                                  (this.db, RequestType.POST, this.executor.createPath(ArangoDBConstants
                                                                                       .PATH_API_GHARIAL, this.graph, ArangoDBConstants.EDGE, name));
            EdgeCreateOptions @params = options != null ? options : new EdgeCreateOptions
                                            ();

            request.putQueryParam(ArangoDBConstants.WAIT_FOR_SYNC, @params
                                  .getWaitForSync());
            request.setBody(this.executor.Serialize(value));
            return(request);
        }
 /// <summary>Creates a new edge in the collection</summary>
 /// <seealso><a href="https://docs.arangodb.com/current/HTTP/Gharial/Edges.html#create-an-edge">API Documentation</a>
 ///     </seealso>
 /// <param name="value">A representation of a single edge (POJO, VPackSlice or String for Json)
 ///     </param>
 /// <param name="options">Additional options, can be null</param>
 /// <returns>information about the edge</returns>
 /// <exception cref="ArangoDBException"/>
 /// <exception cref="ArangoDBException"/>
 public virtual EdgeEntity insertEdge <T>(T value, EdgeCreateOptions
                                          options)
 {
     return(this.executor.execute(this.insertEdgeRequest(value, options), this.insertEdgeResponseDeserializer
                                      (value)));
 }