Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[接口问题] count 参数名前面建议加 @ #51

Closed
zhangchunlin opened this issue Nov 22, 2018 · 3 comments
Closed

[接口问题] count 参数名前面建议加 @ #51

zhangchunlin opened this issue Nov 22, 2018 · 3 comments

Comments

@zhangchunlin
Copy link

zhangchunlin commented Nov 22, 2018

{
  "[]":{
    "count":3,             //只要3个
    "User":{
      "@column":"id,name"  //只要id,name这两个字段
    }
  }
}

这里建议改成 @count ,这样避免和表名重名 (我的python版是会支持表名小写的)

@zhangchunlin zhangchunlin changed the title [接口问题] 为什么count这样的参数要和表名并列呢? [接口问题] count 参数名前面建议加 @ Nov 23, 2018
@TommyLemon
Copy link
Collaborator

TommyLemon commented Nov 26, 2018

count, page, query, join 都是对 数组内整个对象 而言的。
@count 这种如果在主表和副表都有,用哪个呢?都用各自的?
page, query, join 也分别对应地改为 @page, @query, @join ?
这些本来都是统一的配置,不能分开放,放外层不仅能避免以上问题,还更简单明确

@zhangchunlin
Copy link
Author

@TommyLemon 我已经放在外面了,我只是建议在 count 前面加 at 符号

@TommyLemon
Copy link
Collaborator

加不加都是能正常解析的,只要解析时用对应名称就行。
只是写起来还是不加更方便。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants