Class Query
Class which represents a CAML query.
Inheritance
Namespace: CamlBuilder
Assembly: PnP.Framework.dll
Syntax
public class Query : object
Properties
Statement
Gets the statement holded by this query.
Declaration
public Statement Statement { get; }
Property Value
Methods
Build(Statement)
Instanciates a new Query with the specified inner statement
Declaration
public static Query Build(Statement statement)
Parameters
Statement
statement
|
Returns
GetCaml()
Returns query's CAML string representation surrounded by Query element
Declaration
public string GetCaml()
Returns
System. Query CAML string surrounded by Query element. |
GetCaml(Boolean)
Returns query's CAML string representation
Declaration
public string GetCaml(bool whereClauseOnly)
Parameters
System. true to return only query's Where; otherwise false |
Returns
System. Query CAML string surrounded by Query element or only the Where clause |
GroupBy(FieldReference)
Specify the query's group-by options. Query will be grouped by specified fieldRef
.
Declaration
public Query GroupBy(FieldReference fieldRef)
Parameters
Field Reference to the field to group by. |
Returns
Query
Returns the query itself. |
GroupBy(IEnumerable<FieldReference>)
Specify the query's group-by options. Query will be grouped by specified fieldRefs
.
Declaration
public Query GroupBy(IEnumerable<FieldReference> fieldRefs)
Parameters
IEnumerable<Field References to the fields to group by. |
Returns
Query
Returns the query itself. |
OrderBy(FieldReference)
Adds a new query sort order relatively to a specified fieldRef
.
Declaration
public Query OrderBy(FieldReference fieldRef)
Parameters
Field Reference to the field where to perform the ordering on. |
Returns
Query
Returns the query itself. |
Remarks
Use Ascending with false value to specify descending order.
OrderBy(IEnumerable<FieldReference>)
Adds a collection of sort orders relatively to specified fieldRefs
.
Declaration
public Query OrderBy(IEnumerable<FieldReference> fieldRefs)
Parameters
IEnumerable<Field References to the fields where to perform the ordering on. |
Returns
Query
Returns the query itself. |
Remarks
Use Ascending with false value to specify descending order.