From ea8c2d16ec9924e43b0b486ccf0a0c0a7275352a Mon Sep 17 00:00:00 2001 From: TommyLemon <1184482681@qq.com> Date: Mon, 13 Mar 2017 23:01:52 +0800 Subject: [PATCH] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e32e53c6..b3420f19 100644 --- a/README.md +++ b/README.md @@ -223,7 +223,7 @@ DELETE:删除数据,非明文 | base_url/delete/ | {TableName:{"id":id}, "ta "key$":"SQL搜索表达式",任意SQL搜索表达式字符串,如 %key%, %k%e%y% 等 | 模糊搜索 | "name$":"%m%",搜索包含m的名字。一般用于查询一个数组。请求 [{"[]":{"User":{"name$":"%m%"}}}](http://139.196.140.118:8080/get/%7B%22%5B%5D%22%3A%7B%22User%22%3A%7B%22name%24%22%3A%22%2525m%2525%22%7D%2C%22count%22%3A3%2C%22page%22%3A0%7D%7D) 会返回name包含"m"的User数组。 "key+":key指定类型的Object,且类型为Number,String,JSONArray中的一种。如 1,"apijson",["url0","url1"] 等。只用于PUT请求 | 增加/扩展 | "praiseUserIdList+":[1],添加一个点赞用户id,即该用户点了赞 "key-":key指定类型的Object,同"key+" | 减少/去除,与"key+"相反 | "balance-":100.00,余额减少100.00,即花费了100元 - "@key":key指定类型的Object | @key为JSONObject中的关键字,作用各不相同,但都不作为查询匹配条件 | ① 只查询id,sex,name这几列并且请求结果也按照这个顺序:
["@columns":"id,sex,name"](http://139.196.140.118:8080/get/{"User":{"@columns":"id,sex,name","id":38710}})
返回
{
  "id":1,
  "sex":0,
  "name":"Lemon"
}
② 从pictureList获取第0张图片:
[{
  "pictureList":["url0","url1"],
  "@position":0, //这里@position为自定义关键词
  "firstPicture()":"get(Collection:pictureList,int:@position)"
}](http://139.196.140.118:8080/get/{"User":{"id":38710,"@position":0,"firstPicture()":"get(Collection:pictureList,int:@position)"}})
返回
{
  "pictureList":["url0","url1"],
  "@position":0,
  "firstPicture":"url0"
}
... + "@key":key指定类型的Object | @key为JSONObject中的关键字,作用各不相同,但都不作为查询匹配条件 | ① 只查询id,sex,name这几列并且请求结果也按照这个顺序:
["@columns":"id,sex,name"](http://139.196.140.118:8080/get/{"User":{"@columns":"id,sex,name","id":38710}})
返回
{
  "id":1,
  "sex":0,
  "name":"Lemon"
}
② 从pictureList获取第0张图片:
[{
  "@position":0, //这里@position为自定义关键词
  "firstPicture()":"get(Collection:pictureList,int:@position)"
}](http://139.196.140.118:8080/get/{"User":{"id":38710,"@position":0,"firstPicture()":"get(Collection:pictureList,int:@position)"}})
返回
{
  "pictureList":["url0","url1"],
  "@position":0,
  "firstPicture":"url0"
}
... ## 使用方法