/// <summary>Create a cursor and return the first results</summary> /// <seealso><a href="https://docs.arangodb.com/current/HTTP/AqlQueryCursor/AccessingCursors.html#create-cursor">API /// * Documentation</a></seealso> /// <param name="query">contains the query string to be executed</param> /// <param name="bindVars">key/value pairs representing the bind parameters</param> /// <param name="options">Additional options, can be null</param> /// <param name="type">The type of the result (POJO class, VPackSlice, String for Json, or Collection/List/Map) /// </param> /// <returns>cursor of the results</returns> /// <exception cref="ArangoDBException"/> /// <exception cref="com.arangodb.ArangoDBException"/> public virtual ArangoCursor <T> query <T>(string query, System.Collections.Generic.IDictionary <string, object> bindVars, AqlQueryOptions options) { System.Type type = typeof(T); Request request = this.queryRequest(query, bindVars, options ); CursorEntity result = executor.execute(request, typeof(CursorEntity)); return(new ArangoCursor <T>(this, new _ArangoCursorExecute_242(this), type, result)); }
protected internal virtual Request queryRequest(string query, System.Collections.Generic.IDictionary <string, object> bindVars, AqlQueryOptions options) { return(new Request(name, RequestType .POST, ArangoDBConstants.PATH_API_CURSOR).setBody(this.executor .Serialize(OptionsBuilder.build(options != null ? options : new AqlQueryOptions(), query, bindVars)))); }