public Query(QueryType type, long token, ReqlAst term, OptArgs globalOptions) { this.Type = type; this.Token = token; this.Term = term; this.GlobalOptions = globalOptions; }
public virtual string Serialize() { var queryArr = new JArray(); queryArr.Add(Type); if (Term != null) { queryArr.Add(Term.Build()); } if (GlobalOptions != null) { queryArr.Add(ReqlAst.BuildOptarg(GlobalOptions)); } return(queryArr.ToString(Formatting.None)); }
public static Query Start(long token, ReqlAst term, OptArgs globalOptions) { return(new Query(QueryType.START, token, term, globalOptions)); }