paraworld.users.Search (已作废)

Description

依据传入的MQL语句查找用户

不区分大小字

不支持多表联合查询,不支持聚合函数,不支持Top语句;

支持where、order by 、group by语句;

可用字段:uid, uname, createDate, lastActivityDate, email, isOnline

MQL关键字
PageSize: 用在where语句中,以分页的形式返回数据,该值指定每页的最大数据量,必须与PageIndex一起使用才起作用,否则忽略,若指定了PageIndex,却没有提供PageSize,则默认的每页最大数据量为10
PageIndex:用在where语句中,以分页的形式返回数据,该值指定返回的页码,若指定了PageIndex,则必须指定Order by。
示例:select * from users where PageIndex = 0 and PageSize = 20 order by createDate desc //每页最多20条数据,返回第一页的数据

Parameters

Required Name Type Description
required mql string 规范的MQL语句。

Example Return XML

<msg xmlns="">
        <users>
                <param index="1">
                        <uid type="string">7b76d6cc-d94a-41f4-a100-6b5baa53a03e</uid>
                        <uname type="string">test1</uname>
                        <createDate type="string">2008-4-25 6:12:46</createDate>
                </param>
                <param index="2">
                        <uid type="string">e232162c-4a02-421f-9dd1-3348dd922312</uid>
                        <uname type="string">test2</uname>
                        <createDate type="string">2007-10-9 5:48:50</createDate>
                </param>
                <param index="3">
                        <uid type="string">b8872ba2-a3e5-4616-a317-16c876e06ad0</uid>
                        <uname type="string">test3</uname>
                        <createDate type="string">2007-10-9 5:15:29</createDate>
                </param>
                <param index="4">
                        <uid type="string">cc4f0925-db3e-43f5-afd4-596745487a62</uid>
                        <uname type="string">test4</uname>
                        <createDate type="string">2007-9-30 5:25:43</createDate>
                </param>
                <param index="5">
                        <uid type="string">fae5feb1-9d4f-4a78-843a-1710992d4e70</uid>
                        <uname type="string">test5</uname>
                        <createDate type="string">2007-9-28 7:48:19</createDate>
                </param>
        </users>
</msg>

Error Codes

当发生异常时,返回数据中会有一个“errorCode”节点,该节点记录了错误码。0:无异常 500:未知错误 499:提供的数据不完整 498:非法的访问 497:数据不存在或已被删除 496:未登录 494:语法错误

Test Cases

case 1

Input:

{

        ["mql"]="select uid,uname,createDate from users where PageIndex = 0 and PageSize = 5 and createDate > '2008-1-1' order by createDate desc",

}

Result:

{

        ["users"]={

                [1]={

                        ["uid"]="f5f3de7a-05b2-42a0-bd78-415a939020c2",

                        ["createDate"]="2008-5-5 7:44:11",

                        ["uname"]="test1",

                },

                [2]={

                        ["uid"]="6ea770c6-92b2-4b2b-86da-6f574641ec11",

                        ["createDate"]="2008-5-5 7:36:12",

                        ["uname"]="test2",

                },

                [3]={

                        ["uid"]="8ec11316-bc2e-491d-8f18-667501687e69",

                        ["createDate"]="2008-5-5 7:36:05",

                        ["uname"]="test3",

                },

                [4]={

                        ["uid"]="3ea9e436-c68a-4316-bf90-7de514b9979e",

                        ["createDate"]="2008-5-5 7:02:17",

                        ["uname"]="test4",

                },

                [5]={

                        ["uid"]="ed06733e-986d-4236-8fc8-9f8300456c21",

                        ["createDate"]="2008-5-3 6:38:31",

                        ["uname"]="test5",

                },

        },

}
Topic revision: r4 - 2008-12-08 - CaoYF
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback