[English](https://github.com/Tencent/APIJSON/blob/master/Document-English.md)
# APIJSON
APIJSON C#, Go, Java, JavaScript, PHP, Python, TypeScript
https://github.com/Tencent/APIJSON

[1](http://apijson.cn/doc/zh/) [2](https://hanxu2018.github.io/APIJSON-DOC/) key? key~ "@column":"store_id,sum(amt):totAmt" , ; SQL "@column":"store_id;sum(amt):totAmt"
* ### [1.](#1)
* ### [2.](#2)
* [2.1 ](#2.1)
* [2.2 ](#2.2)
* [2.3 ](#2.3)
* [2.4 ](#2.4)
* [2.5 ](#2.5)
* [2.6 ](#2.6)
* ### [3.](#3)
* [3.1 ](#3.1)
* [3.2 ](#3.2)
## 1.
####
{
"User":{
"id":38710
}
}
[](http://apijson.cn:8080/get/{"User":{"id":38710}})
{
"User":{
"id":38710,
"sex":0,
"name":"TommyLemon",
"tag":"Android&Java",
"head":"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
"date":1485948110000,
"pictureList":[
"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
"http://common.cnblogs.com/images/icon_weibo_24.png"
]
},
"code":200,
"msg":"success"
}
[GIF] APIJSON

####
{
"[]":{
"count":3, //3
"User":{
"@column":"id,name" //id,name
}
}
}
[](http://apijson.cn:8080/get/{"[]":{"count":3,"User":{"@column":"id,name"}}})
{
"[]":[
{
"User":{
"id":38710,
"name":"TommyLemon"
}
},
{
"User":{
"id":70793,
"name":"Strong"
}
},
{
"User":{
"id":82001,
"name":"Android"
}
}
],
"code":200,
"msg":"success"
}
[GIF] APIJSON

####
{
"Moment":{
},
"User":{
"id@":"Moment/userId" //User.id = Moment.userId
}
}
[](http://apijson.cn:8080/get/{"Moment":{},"User":{"id@":"Moment%252FuserId"}})
{
"Moment":{
"id":12,
"userId":70793,
"date":"2017-02-08 16:06:11.0",
"content":"1111534034"
},
"User":{
"id":70793,
"sex":0,
"name":"Strong",
"tag":"djdj",
"head":"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000",
"contactIdList":[
38710,
82002
],
"date":"2017-02-01 19:21:50.0"
},
"code":200,
"msg":"success"
}
####
{
"[]":{ //
"page":0, //
"count":2,
"Moment":{ //Moment
"content$":"%a%" //contenta
},
"User":{
"id@":"/Moment/userId", //User.id = Moment.userId
"@column":"id,name,head" //
},
"Comment[]":{ //CommentComment
"count":2,
"Comment":{
"momentId@":"[]/Moment/id" //Comment.momentId = Moment.id
}
}
}
}
[](http://apijson.cn:8080/get/{"[]":{"page":0,"count":2,"Moment":{"content$":"%2525a%2525"},"User":{"id@":"%252FMoment%252FuserId","@column":"id,name,head"},"Comment[]":{"count":2,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
{
"[]":[
{
"Moment":{
"id":15,
"userId":70793,
"date":1486541171000,
"content":"APIJSONisaJSONTransmissionStructureProtocol",
"praiseUserIdList":[
82055,
82002,
82001
],
"pictureList":[
"http://static.oschina.net/uploads/user/1218/2437072_100.jpg?t=1461076033000",
"http://common.cnblogs.com/images/icon_weibo_24.png"
]
},
"User":{
"id":70793,
"name":"Strong",
"head":"http://static.oschina.net/uploads/user/585/1170143_50.jpg?t=1390226446000"
},
"Comment[]":[
{
"id":176,
"toId":166,
"userId":38710,
"momentId":15,
"date":1490444883000,
"content":"thank you"
},
{
"id":1490863469638,
"toId":0,
"userId":82002,
"momentId":15,
"date":1490863469000,
"content":"Just do it"
}
]
},
{
"Moment":{
"id":58,
"userId":90814,
"date":1485947671000,
"content":"This is a Content...-435",
"praiseUserIdList":[
38710,
82003,
82005,
93793,
82006,
82044,
82001
],
"pictureList":[
"http://static.oschina.net/uploads/img/201604/22172507_aMmH.jpg"
]
},
"User":{
"id":90814,
"name":7,
"head":"http://static.oschina.net/uploads/user/51/102723_50.jpg?t=1449212504000"
},
"Comment[]":[
{
"id":13,
"toId":0,
"userId":82005,
"momentId":58,
"date":1485948050000,
"content":"This is a Content...-13"
},
{
"id":77,
"toId":13,
"userId":93793,
"momentId":58,
"date":1485948050000,
"content":"This is a Content...-77"
}
]
}
],
"code":200,
"msg":"success"
}
[GIF] APIJSON

[GIF] APIJSON JOIN< LEFT JOIN, & INNER JOIN

[GIF] APIJSON @from@ FROM, key@ =, key>@ >, key{}@ IN, key}{@ EXISTS

[GIF] APIJSON

[](http://apijson.cn/api)
## 2.RESTful
### 2.1
| | APIJSON
-------- | ------------ | ------------
| |
| v22 |
### 2.2
| | APIJSON
-------- | ------------ | ------------
| URL | URLJSON
URL | URLURL | ()URL
7URL
| key=value | key:value
| URLtable_name
base_url/get/table_name?
key0=value0&key1=value1... | URLTableName
base_url/get/
{
TableName0:{
key0:value0,
key1:value1,
...
},
TableName1:{
...
}
...
}
### 2.3
| | APIJSON
-------- | ------------ | ------------
| JSON | Parser#parse
JSON | |
### 2.4
| | APIJSON
-------- | ------------ | ------------
| |
| JSONJSONObject | JSONResponseJSONObject
### 2.5
| | APIJSON
-------- | ------------ | ------------
User | base_url/get/user?id=38710 | [base_url/get/
{
"User":{
"id":38710
}
}](http://apijson.cn:8080/get/{"User":{"id":38710}})
MomentUser |
Moment:
base_url/get/moment?userId=38710
User:
base_url/get/user?id=38710 | [base_url/get/
{
"Moment":{
"userId":38710
},
"User":{
"id":38710
}
}](http://apijson.cn:8080/get/{"Moment":{"userId":38710},"User":{"id":38710}})
User | base_url/get/user/list?
page=0&count=3&sex=0 | [base_url/get/
{
"User[]":{
"page":0,
"count":3,
"User":{
"sex":0
}
}
}](http://apijson.cn:8080/get/{"User[]":{"page":0,"count":3,"User":{"sex":0}}})
Moment
Moment
1.User
2.3Comment | Moment
1.User
2.Comment
base_url/get/moment/list?
page=0&count=3&commentCount=3 | [base_url/get/
{
"[]":{
"page":0,
"count":3,
"Moment":{},
"User":{
"id@":"/Moment/userId"
},
"Comment[]":{
"count":3,
"Comment":{
"momentId@":"[]/Moment/id"
}
}
}
}](http://apijson.cn:8080/get/{"[]":{"page":0,"count":3,"Moment":{},"User":{"id@":"%252FMoment%252FuserId"},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
UserMoment
Moment
1.User
2.3Comment | 1.MomentUserComment
2.
commentCount,comment_countcmt_count...
base_url/get/moment/list?
page=0&count=3
&commentCount=3&userId=38710 | :
"Moment":{}, "User":{"id@":"/Moment/userId"}
["Moment":{"userId":38710}, "User":{"id":38710}](http://apijson.cn:8080/get/{"[]":{"page":0,"count":3,"Moment":{"userId":38710},"User":{"id":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
UserUser
[base_url/get/
{
"User":{
"id":38710
},
"[]":{
"page":0,
"count":3,
"Moment":{
"userId":38710
},
"Comment[]":{
"count":3,
"Comment":{
"momentId@":"[]/Moment/id"
}
}
}
}](http://apijson.cn:8080/get/{"User":{"id":38710},"[]":{"page":0,"count":3,"Moment":{"userId":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
UserUser
[base_url/get/
{
"[]":{
"page":0,
"count":3,
"Moment":{
"userId":38710
},
"Comment[]":{
"count":3,
"Comment":{
"momentId@":"[]/Moment/id"
}
}
}
}](http://apijson.cn:8080/get/{"[]":{"page":0,"count":3,"Moment":{"userId":38710},"Comment[]":{"count":3,"Comment":{"momentId@":"[]%252FMoment%252Fid"}}}})
### 2.6
| | APIJSON
-------- | ------------ | ------------
User | {
"data":{
"id":38710,
"name":"xxx",
...
},
"code":200,
"msg":"success"
} | {
"User":{
"id":38710,
"name":"xxx",
...
},
"code":200,
"msg":"success"
}
MomentUser | MomentuserIdUseridUser
Moment:
{
"data":{
"id":235,
"content":"xxx",
...
},
"code":200,
"msg":"success"
}
User:
{
"data":{
"id":38710,
"name":"xxx",
...
},
"code":200,
"msg":"success"
} |
{
"Moment":{
"id":235,
"content":"xxx",
...
},
"User":{
"id":38710,
"name":"xxx",
...
},
"code":200,
"msg":"success"
}
User | {
"data":[
{
"id":38710,
"name":"xxx",
...
},
{
"id":82001,
...
},
...
],
"code":200,
"msg":"success"
} | {
"User[]":[
{
"id":38710,
"name":"xxx",
...
},
{
"id":82001,
...
},
...
],
"code":200,
"msg":"success"
}
MomentMomentUser3Comment | Moment
1.User
2.Comment
{
"data":[
{
"id":235,
"content":"xxx",
...,
"User":{
...
},
"Comment":[
...
]
},
{
"id":301,
"content":"xxx",
...,
"User":{
...
},
...
},
...
],
"code":200,
"msg":"success"
} | 1.
2.
{
"[]":[
{
"Moment":{
"id":235,
"content":"xxx",
...
},
"User":{
...
},
"Comment[]":[
...
]
},
{
"Moment":{
"id":301,
"content":"xxx",
...
},
"User":{
...
},
...
},
...
],
"code":200,
"msg":"success"
}
UserMomentMomentUser3Comment | 1.User
2./
{
"data":[
{
"id":235,
"content":"xxx",
...,
"User":{
"id":38710,
"name":"Tommy"
...
},
"Comment":[
...
]
...
},
{
"id":470,
"content":"xxx",
...,
"User":{
"id":38710,
"name":"Tommy"
...
},
"Comment":[
...
]
...
},
{
"id":511,
"content":"xxx",
...,
"User":{
"id":38710,
"name":"Tommy"
...
},
"Comment":[
...
]
...
},
{
"id":595,
"content":"xxx",
...,
"User":{
"id":38710,
"name":"Tommy"
...
},
"Comment":[
...
]
...
},
...
],
"code":200,
"msg":"success"
} | :
{
"[]":[
{
"Moment":{
"id":235,
"content":"xxx",
...
},
"User":{
"id":38710,
"name":"Tommy"
...
},
"Comment[]":[
...
]
},
...
],
"code":200,
"msg":"success"
}
User
{
"User":{
"id":38710,
"name":"Tommy",
...
},
"[]":[
{
"Moment":{
"id":235,
"content":"xxx",
...
},
"Comment[]":[
...
]
},
...
],
"code":200,
"msg":"success"
}
User
{
"[]":[
{
"Moment":{
"id":235,
"content":"xxx",
...
},
"Comment[]":[
...
]
},
...
],
"code":200,
"msg":"success"
}
1.base_urlurlbase_urlbase_url:http://apijson.cn:8080/ GETurl:http://apijson.cn:8080/get/
2.keyvaluenull key:value
3. / JSONRequest.javaURLEncoder.encodePostmanurl/requestrequest / %252F
4.code200HTTP
5.msg
6.codemsgcodemsg
7.id
## 3.
### 3.1
| URL | Request | Response
------------ | ------------ | ------------ | ------------
GET:
| base_url/get/ | {
TableName:{
}
}
{}
id = 235 Moment
[{
"Moment":{
"id":235
}
}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&type=JSON&json={"Moment"%3A{"id"%3A235}})
SQL
`SELECT * FROM Moment WHERE id=235 LIMIT 1` | {
TableName:{
...
},
"code":200,
"msg":"success"
}
{
"Moment":{
"id":235,
"userId":38710,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"code":200,
"msg":"success"
}
HEAD:
| base_url/head/ | {
TableName:{
}
}
{}
id = 38710 User Moment
[{
"Moment":{
"userId":38710
}
}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fhead&type=JSON&json={"Moment"%3A{"userId"%3A38710}})
SQL
`SELECT count(*) FROM Moment WHERE userId=38710 LIMIT 1` | {
TableName:{
"code":200,
"msg":"success",
"count":10
},
"code":200,
"msg":"success"
}
{
"Moment":{
"code":200,
"msg":"success",
"count":10
},
"code":200,
"msg":"success"
}
GETS:
/
| base_url/gets/ | "tag":tag ["tag":"Privacy"](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fgets&type=JSON&json={"tag"%3A"Privacy","Privacy"%3A{"id"%3A82001}})GET | GET
HEADS:
/
| base_url/heads/ | "tag":tag ["tag":"Verify"](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fheads&type=JSON&json={"tag"%3A"Verify","Verify"%3A{"phone"%3A13000082001}})HEAD | HEAD
POST:
| base_url/post/ |
{
TableName:{
},
"tag":tag
}
{}id
38710 Comment
[{
"Comment":{
"momentId":12,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"tag":"Comment"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fpost&type=JSON&json={"Comment":{"momentId":12,"content":"APIJSON,let%20interfaces%20and%20documents%20go%20to%20hell%20!"},"tag":"Comment"})
SQL
`INSERT INTO Comment(userId,momentId,content) VALUES(38710,12,'APIJSON,let interfaces and documents go to hell !')`
{
TableName\[]:\[{
}, {
}
],
"tag":tag
}
{}id
82001 2 Comment
[{
"Comment[]":[{
"momentId":12,
"content":"APIJSON,let interfaces and documents go to hell !"
}, {
"momentId":15,
"content":"APIJSON is a JSON transmision protocol."
}],
"tag":"Comment:[]"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fpost&type=JSON&json={"Comment[]":[{"momentId":12,"content":"APIJSON,let%20interfaces%20and%20documents%20go%20to%20hell%20!"},{"momentId":15,"content":"APIJSON%20is%20a%20JSON%20transmision%20protocol."}],"tag":"Comment:[]"})
SQL
`INSERT INTO Comment(userId,momentId,content) VALUES(82001,12,'APIJSON,let interfaces and documents go to hell !');`
`INSERT INTO Comment(userId,momentId,content) VALUES(82001,15,'APIJSON is a JSON transmision protocol.');` |
{
TableName:{
"code":200,
"msg":"success",
"id":38710
},
"code":200,
"msg":"success"
}
{
"Comment":{
"code":200,
"msg":"success",
"id":120
},
"code":200,
"msg":"success"
}
{
TableName:{
"code":200,
"msg":"success",
"count":5,
"id[]":[1, 2, 3, 4, 5]
},
"code":200,
"msg":"success"
}
{
"Comment":{
"code":200,
"msg":"success",
"count":2,
"id[]":\[1, 2]
},
"code":200,
"msg":"success"
}
PUT:
| base_url/put/ | {
TableName:{
"id":id,
},
"tag":tag
}
{} id id{}
82001 id = 235 Moment content
[{
"Moment":{
"id":235,
"content":"APIJSON,let interfaces and documents go to hell !"
},
"tag":"Moment"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput&type=JSON&json={"Moment":{"id":235,"content":"APIJSON,let%20interfaces%20and%20documents%20go%20to%20hell%20!"},"tag":"Moment"})
SQL
`UPDATE Moment SET content='APIJSON,let interfaces and documents go to hell !' WHERE id=235 AND userId=82001 LIMIT 1`
id{}:\[] POST {...} id
"tag":"Comment[]" "Comment":{"id{}":[1,2,3]}
"tag":"Comment:[]" "Comment[]":[{"id":1},{"id":2},{"id":3}] | POST
DELETE:
| base_url/delete/ | {
TableName:{
"id":id
},
"tag":tag
}
{} id id{} id id{}
82001 id = 100,110,120 Comment
[{
"Comment":{
"id{}":[100,110,120]
},
"tag":"Comment[]"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fdelete&type=JSON&json={"Comment":{"id{}":[100,110,120]},"tag":"Comment[]"})
SQL
`DELETE FROM Comment WHERE id IN(100,110,120) AND userId=82001 LIMIT 3` | {
TableName:{
"code":200,
"msg":"success",
"id[]":[100,110,120]
"count":3
},
"code":200,
"msg":"success"
}
{
"Comment":{
"code":200,
"msg":"success",
"id[]":[100,110,120],
"count":3
},
"code":200,
"msg":"success"
}
:
base_url/{method}/{tag} | GET:
base_url/get/{tag}
HEAD:
base_url/head/{tag}
GETS: /
base_url/gets/{tag}
HEADS: /
base_url/heads/{tag}
POST:
base_url/post/{tag}
PUT: base_url/put/{tag}
DELETE:
base_url/delete/{tag} | / id = 82001 Privacy
[base_url/gets/Privacy/
{"id":82001}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fgets%2FPrivacy&type=JSON&json={"id"%3A82001})
[base_url/gets/
{"tag":"Privacy", "Privacy":{"id":82001}}](http://apijson.cn/api/?url=http%3A%2F%2Fapijson.cn%3A8080%2Fgets&type=JSON&json={"tag"%3A"Privacy","Privacy"%3A{"id"%3A82001}})
id = 114, 124 Comment content
[base_url/put/Comemnt[]/
{
"id{}":[114,124],
"content":"test multi put"
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput%2FComment[]&type=JSON&json={"id{}"%3A[114,124],"content"%3A"test%20multi%20put"})
[base_url/put/
{
"tag":"Comment[]",
"Comment":{
"id{}":[114,124],
"content":"test multi put"
}
}](http://apijson.cn/api?url=http%3A%2F%2Fapijson.cn%3A8080%2Fput&type=JSON&json={"tag"%3A"Comment[]","Comment"%3A{"id{}"%3A[114,124],"content"%3A"test%20multi%20put"}}) |
1.TableNameTableJSONObject {...}Table()
2."tag":tag tagGETHEADJSONTableRequest
3.GETHEAD/ method, tag, version, structure Request version null "key":[value]key JSONArrayvalue Boolean, Number, String | ["contactIdList":38710](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"contactIdList":38710}}})SQL`json_contains(contactIdList,38710)` contactIdList 38710 User
| "key}{@":{
"from":"Table",
"Table":{ ... }
}
}{ EXISTS
key
@ | ["id}{@":{
"from":"Comment",
"Comment":{
"momentId":15
}
}](http://apijson.cn:8080/get/{"User":{"id}{@":{"from":"Comment","Comment":{"momentId":15}}}})
WHERE EXISTS(SELECT * FROM Comment WHERE momentId=15)
| "key()":"" function(key0,key1...) function(JSONObject request, String key0, String key1...)
- + key-() > > key() > > key+() | ["isPraised()":"isContain(praiseUserIdList,userId)"](http://apijson.cn:8080/get/{"Moment":{"id":301,"isPraised()":"isContain(praiseUserIdList,userId)"}}) [boolean isContain(JSONObject request, String array, String value)](https://github.com/APIJSON/apijson-framework/blob/master/src/main/java/apijson/framework/APIJSONFunctionParser.java#L361-L374) "isPraised":true id userId User
| "@key()":"SQL"
function(key0,key1...)
SQL
function(String key0, String key1...)
| ["@limit":10,
"@offset":0,
"@procedure()":"getCommentByUserId(id,@limit,@offset)"](http://apijson.cn:8080/get/{"User":{"@limit":10,"@offset":0,"@procedure()":"getCommentByUserId(id,@limit,@offset)"}})
`getCommentByUserId(38710,10,0)`
SQL
`getCommentByUserId(IN id bigint, IN limit int, IN offset int)`
"procedure":{
"count":-1,
"update":false,
"list":[]
}
count -1 update list
| "key@":"key0/key1/.../refKey" / / key
refKey key refKey refKey @column "@column":"refKey,key1,..." | ["Moment":{
"userId":38710
},
"User":{
"id@":"/Moment/userId"
}](http://apijson.cn:8080/get/{"Moment":{"userId":38710},"User":{"id@":"%252FMoment%252FuserId"}})
User id User Moment userId
User.id = Moment.userId
"id@":"/Moment/userId" "id":38710
| "key@":{
"range":"ALL",
"from":"Table", // key
"Table":{ ... }
}
range ALL,ANY
from Table
@ count join | ["id@":{
"from":"Comment", //
"Comment":{
"@column":"min(userId)"
}
}](http://apijson.cn:8080/get/{"User":{"id@":{"from":"Comment","Comment":{"@column":"min(userId)"}}}})
WHERE id=(SELECT min(userId) FROM Comment)
| `"key$":"SQL"` => `"key$":["SQL"]` SQL %key%( key), key%( key ), %k%e%y%( k,e,y) % | ["name$":"%m%"](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"name$":"%2525m%2525"}}}) SQL `name LIKE '%m%'` name "m" User
| "key~":"" => "key~":[""] ^[0-9]+$ *~ | ["name~":"^[0-9]+$"](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"name~":"^[0-9]%252B$"}}}) SQL `name REGEXP '^[0-9]+$'` name User
| "key%":"start,end" => "key%":["start,end"] start end Number, String "2017-01-01,2019-01-01" ["1,90000", "82001,100000"] | ["date%":"2017-10-01,2018-10-01"](http://apijson.cn:8080/get/{"User[]":{"count":3,"User":{"date%2525":"2017-10-01,2018-10-01"}}})SQL`date BETWEEN '2017-10-01' AND '2018-10-01'`2017-10-012018-10-01User
| "name:alias"name alias alias name column,Table,SQL GET HEAD | ["@column":"toId:parentId"](http://apijson.cn:8080/get/{"Comment":{"@column":"id,toId:parentId","id":51}}) SQL `toId AS parentId` toId parentId
| "key+":ObjectObjectkey Number,String,JSONArray 82001,"apijson",["url0","url1"] PUT | "praiseUserIdList+":[82001] SQL `json_insert(praiseUserIdList,82001)` id
| "key-":Object"key+" | "balance-":100.00SQL`balance = balance - 100.00`100.00100
| >, =, (SELECT min(userId) FROM Comment)
| &, \|, ! SQL AND, OR, NOT
\| key & @combine
& "key&{}":""
\| "key\|{}":"", "key\|{}":[]
! "key!":Object &,\|
"key!":null null "key{}":"!=null"
"key":null "key{}":"=null" | ["id&{}":">80000,80000,90000,90000,90000," - RIGHT JOIN
"&" - INNER JOIN
"\|" - FULL JOIN
"!" - OUTER JOIN
"*" - CROSS JOIN
"^" - SIDE JOIN
"(" - ANTI JOIN
")" - FOREIGN JOIN
@ APP JOIN key@ refKey refKeys: [value0, value1...] count key=$refKey SQL key IN($refKeys) SQL
JOIN SQL JOIN MySQL,PostgreSQL JOIN
`"join":"=100"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":{"@column":"userId%253Bmax(id)","@group":"userId","@having":"max(id)>=100"}}})
SQL `SELECT userId,max(id) ... GROUP BY userId HAVING max(id)>=100`
["@column":"userId;max(id):maxId",
"@group":"userId",
"@having":"(maxId)>=100"](http://apijson.cn:8080/get/{"[]":{"count":10,"Moment":{"@column":"userId%253Bmax(id):maxId","@group":"userId","@having":"(maxId)>=100"}}})
SQL `SELECT userId,max(id) AS maxId ... GROUP BY userId HAVING (maxId)>=100`
sys User
["@schema":"sys"](http://apijson.cn:8080/get/{"User":{"@schema":"sys"}})
SQL `FROM sys.User`
PostgreSQL User
["@database":"POSTGRESQL"](http://apijson.cn:8080/get/{"User":{"@database":"POSTGRESQL","@explain":true}})
Druid User
["@datasource":"DRUID"](http://apijson.cn:8080/get/{"User":{"@datasource":"DRUID"}})
VARCHAR get JSONArray
["@json":"get"](http://apijson.cn:8080/get/{"Access":{"@json":"get"}})
["@role":"OWNER"](http://apijson.cn:8080/get/{"[]":{"Moment":{"@role":"OWNER"}}})
["@explain":true](http://apijson.cn:8080/get/{"[]":{"Moment":{"@explain":true}}})
SQL `EXPLAIN`
userId
["@column":"date;left(date,10):day;sum(if(userId%2=0,1,0))",
"@group":"day",
"@having":"to_days(now())-to_days(\`date\`)