public static Select Select(params IFieldRef[] fields) { //IList<QueryExpression> sqlList = new List<QueryExpression>(); QueryContext context = new QueryContext(); Select s = new Select(context, fields); return s; }
// <OrderBy> // <FieldRef Name="Newcomers"/> // <FieldRef Name="Years" Ascending="FALSE"/> // <FieldRef Name="Location"/> //</OrderBy> public static string View( QueryContext qc ) { string xml = "<View>" + "<Query>" + Where(qc.Query); if (qc.OrderByFields.Count > 0) xml += OrderBy(qc.OrderByFields); xml += "</Query>"; if( qc.ViewFields != null || qc.ViewFields.Length > 0 ) xml += "<ViewFieds>" + ViewFields(qc.ViewFields) + "</ViewFieds>"; if (qc.RowLimit > 0) xml += "<RowLimit>"+qc.RowLimit+"</RowLimit>"; xml +="</View>"; return xml ; }
public static Select Select(uint top) { QueryContext context = new QueryContext(); context.RowLimit = top; Select s = new Select(context, null); return s; }
public static Select Select( uint top , params IFieldRef[] fields) { QueryContext context = new QueryContext(); context.RowLimit = top; Select s = new Select(context, fields); return s; }
internal Group(QueryContext context, IFieldRef field) : base(context) { context.GroupByField = field; }
internal Where( QueryContext context , ICAMLExpression expr) : base(context) { context.Query = expr; }
internal Select(QueryContext context , params IFieldRef[] fields) : base(context) { context.ViewFields = fields ; }
internal From(QueryContext context , SPList list ) : base(context) { context.List = list; }
public ReturnableQuerySentence(QueryContext c) : base(c) { }
internal QuerySentence(QueryContext context) { Context = context; }
internal Order(QueryContext context, IFieldRef field, bool desc) : base(context) { context.OrderByFields.Add(field, desc); }
public static Select Select() { QueryContext context = new QueryContext(); Select s = new Select(context, null); return s; }