执行示例:
`
POST 127.0.0.1:8080/get
Content-Type: application/json
{
"Document": {
"id{}": ">1"
}
}
终端输出
2022/06/08 14:01:16 Debug Document -> parse id{} >1
2022/06/08 14:01:16 Debug parse Document: &{ctx:0xc000030b80 start:1654668076502673478 depth:0 running:false completed:false isList:false page: count: sqlExecutor:0xc00016ea20 primaryKey: relateKV:map[] Key:Document Path:Document RequestMap:map[id{}:>1] CurrentData:map[] ResultList:[] children:map[]}
2022/06/08 14:01:16 Debug exec SELECT * FROM Document WHERE id{}=? LIMIT 1, params: [>1]
2022/06/08 14:01:16 http: superfluous response.WriteHeader call from github.com/j2go/apijson/handler.commonHandle (handler.go:41)
`
返回信息
`
{"code":200,"msg":"Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{}=? LIMIT 1' at line 1","ok":true}
`
phpmyadmin查询Document 表有数据存在
执行示例:
`
POST 127.0.0.1:8080/get
Content-Type: application/json
{
"Document": {
"id{}": ">1"
}
}
终端输出2022/06/08 14:01:16 Debug Document -> parse id{} >1
2022/06/08 14:01:16 Debug parse Document: &{ctx:0xc000030b80 start:1654668076502673478 depth:0 running:false completed:false isList:false page: count: sqlExecutor:0xc00016ea20 primaryKey: relateKV:map[] Key:Document Path:Document RequestMap:map[id{}:>1] CurrentData:map[] ResultList:[] children:map[]}
2022/06/08 14:01:16 Debug exec SELECT * FROM Document WHERE id{}=? LIMIT 1, params: [>1]
2022/06/08 14:01:16 http: superfluous response.WriteHeader call from github.com/j2go/apijson/handler.commonHandle (handler.go:41)
`
返回信息
`
{"code":200,"msg":"Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '{}=? LIMIT 1' at line 1","ok":true}
`
phpmyadmin查询Document 表有数据存在