Exemple #1
0
        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 += "<ViewFields>" + ViewFields(qc.ViewFields) + "</ViewFields>";
            }

            if (qc.RowLimit > 0)
            {
                xml += "<RowLimit>" + qc.RowLimit + "</RowLimit>";
            }

            xml += "</View>";

            return xml;
        }
Exemple #2
0
        public static Select Select(params IFieldRef[] fields)
        {
            QueryContext context = new QueryContext();

            Select s = new Select(context, fields);

            return s;
        }
Exemple #3
0
        public static Select Select(uint top)
        {
            QueryContext context = new QueryContext();
            context.RowLimit = top;

            Select s = new Select(context, null);

            return s;
        }
Exemple #4
0
        public static Select Select(uint top, params IFieldRef[] fields)
        {
            QueryContext context = new QueryContext();
            context.RowLimit = top;

            Select s = new Select(context, fields);

            return s;
        }
Exemple #5
0
 internal Order(QueryContext context, IFieldRef field, bool desc)
     : base(context)
 {
     context.OrderByFields.Add(field, desc);
 }
Exemple #6
0
        public static Select Select()
        {
            QueryContext context = new QueryContext();

            Select s = new Select(context, null);
            return s;
        }
Exemple #7
0
 internal From(QueryContext context, SPList list)
     : base(context)
 {
     context.List = list;
 }
Exemple #8
0
 internal Group(QueryContext context, IFieldRef field)
     : base(context)
 {
     context.GroupByField = field;
 }
Exemple #9
0
 internal Where(QueryContext context, ICAMLExpression expr)
     : base(context)
 {
     context.Query = expr;
 }
Exemple #10
0
 internal Select(QueryContext context, params IFieldRef[] fields)
     : base(context)
 {
     context.ViewFields = fields;
 }
Exemple #11
0
 public ReturnableQuerySentence(QueryContext c)
     : base(c)
 {
 }
Exemple #12
0
 internal QuerySentence(QueryContext context)
 {
     Context = context;
 }