GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 单表新增、修改、删除支持别名 · Issue #470 · APIJSON/APIJSON

单表新增、修改、删除支持别名 #470

New issue
Copy link
New issue
Copy link
Open
Open
单表新增、修改、删除支持别名#470
Copy link
Labels
Enhancement 增强增强功能、提高性能等增强功能、提高性能等

Description

@cloudAndMonkey
cloudAndMonkey
opened on Nov 15, 2022
Issue body actions

apijson版本: 5.2.0
校验入口, 添加代码:
image
返回结果添加如下代码:
image
JSONResponse 格式化返回结果:
image
示例说明:
新增:
image
image
修改:
image
image
删除
image

Reacted by TommyLemon

Activity

  1. TommyLemon
    added
    Enhancement 增强增强功能、提高性能等增强功能、提高性能等
    on Nov 23, 2022
  2. TommyLemon commented on Nov 26, 2022

    @TommyLemon
    TommyLemon
    on Nov 26, 2022
    Member
    More actions

    @cloudAndMonkey 默认还是不要把 User:aa 转为 aa,因为可能还同时有 Comment:aa, Moment:aa 等,转换后就只剩最后一个,上面的都被覆盖了。
    只有 format: true 时才转(也有这个 bug,不过至少默认是 false 不会触发)。

    {
        "User": {},
        "User:count": {
            "@column": "count(*)"
        },
        "Comment:count": {
            "@column": "count(1)"
        }
    }

    image

    http://apijson.cn/api/?send=true&type=JSON&url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&json={%22User:count%22:{%22@column%22:%22count(*)%22},%22Comment:count%22:{%22@column%22:%22count(1)%22}}

    image

    http://apijson.cn/api/?send=true&type=JSON&url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&json={%22User:count%22:{%22@column%22:%22count(*)%22},%22Comment:count%22:{%22@column%22:%22count(1)%22},%22format%22:true}
  3. cloudAndMonkey commented on Jan 16, 2023

    @cloudAndMonkey
    cloudAndMonkey
    on Jan 16, 2023
    ContributorAuthor
    More actions

    @cloudAndMonkey 默认还是不要把 User:aa 转为 aa,因为可能还同时有 Comment:aa, Moment:aa 等,转换后就只剩最后一个,上面的都被覆盖了。 只有 format: true 时才转(也有这个 bug,不过至少默认是 false 不会触发)。

    {
        "User": {},
        "User:count": {
            "@column": "count(*)"
        },
        "Comment:count": {
            "@column": "count(1)"
        }
    }
    image

    http://apijson.cn/api/?send=true&type=JSON&url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&json={%22User:count%22:{%22@column%22:%22count(*)%22},%22Comment:count%22:{%22@column%22:%22count(1)%22}}

    image

    http://apijson.cn/api/?send=true&type=JSON&url=http%3A%2F%2Fapijson.cn%3A8080%2Fget&json={%22User:count%22:{%22@column%22:%22count(*)%22},%22Comment:count%22:{%22@column%22:%22count(1)%22},%22format%22:true}
    @TommyLemon
    github notifications 没有提醒,我都没看到,不好意思 ,😄
    image

  4. cloudAndMonkey commented on Jan 16, 2023

    @cloudAndMonkey
    cloudAndMonkey
    on Jan 16, 2023
    ContributorAuthor
    More actions

    我测了一下,你已经加上去了, 不好意思. 😄

  5. TommyLemon commented on Jan 20, 2023

    @TommyLemon
    TommyLemon
    on Jan 20, 2023
    Member
    More actions

    😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement 增强增强功能、提高性能等增强功能、提高性能等

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.