查询架构

上次修改时间: 2010年11月1日

适用范围: SharePoint Foundation 2010

在 Microsoft SharePoint Foundation 的上下文中按照各种方式使用协作应用程序标记语言 (CAML) 的查询架构来定义对列表数据的查询。可以将 CAML 查询字符串分配给服务器和客户端对象模型中的多个类的 Query 属性以便返回数据,也可以将其分配给 Lists Web 服务的方法参数以远程处理数据。CAML 查询还可用于 CAML 视图的上下文中以返回特定的数据。列表架构Query 元素包含查询架构的元素。

查询架构元素

    <Where>

        Logical Joins

        <And>

            [Logical Joins]

            [Comparison Operators]

            <Membership>

        <Or>

            [Logical Joins]

            [Comparison Operators]

            <Membership>

        Comparison Operators

        <BeginsWith>

            <FieldRef>

            <Value>

            <XML>

        <Contains>

            <FieldRef>

            <Value>

            <XML>

        <DateRangesOverlap>

            <FieldRef>

            <Value>

        <Eq>

            <FieldRef>

            <Value>

            <XML>

        <Geq>

            <FieldRef>

            <Value>

            <XML>

        <Gt>

            <FieldRef>

            <Value>

            <XML>

        <In>

            <FieldRef>

            <Values>

               <Value>

            <XML>

        <Includes>

              <FieldRef>

              <Value>

              <XML>

        <IsNotNull>

            <FieldRef>

        <IsNull>

            <FieldRef>

        <Leq>

            <FieldRef>

            <Value>

            <XML>

        <Lt>

            <FieldRef>

            <Value>

            <XML>

        <Membership>

        <Neq>

              <FieldRef>

              <Value>

              <XML>

        <NotIncludes>

              <FieldRef>

              <Value>

              <XML>

    Group/Order 运算符

    <GroupBy>

        <FieldRef>

    <OrderBy>

        <FieldRef>

    值的子元素

        <ListProperty>

        <Month>

        <Now>

        <Today>

        <UserID>

        <XML>

请参阅

概念

视图架构

列表架构