Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ This example repo uses the NestJS swagger module for API documentation. [NestJS

# 使用文档


> 以下例子中 默认存在两张表(Comment, User),实际使用时,需要在添加对应的entity,在service中引入即可

查看当前可用的table 可访问 `GET /table`

- 通用查询接口 `POST /apijson/get`
- 通用新增接口 `POST /apijson/add`
- 通用修改接口 `POST /apijson/update`

已经实现的操作符

Expand Down Expand Up @@ -85,7 +91,6 @@ This example repo uses the NestJS swagger module for API documentation. [NestJS
}
}
```
![list](./asserts/list.png)
- \#

操作符名称: 别名
Expand Down Expand Up @@ -113,10 +118,6 @@ This example repo uses the NestJS swagger module for API documentation. [NestJS
}
}
```

![column](./asserts/column.png)


- 联表查询

例子:
Expand All @@ -132,8 +133,6 @@ This example repo uses the NestJS swagger module for API documentation. [NestJS
}
}
```
![union-query](./asserts/union-query.png)

```json
// 查询所有符合条件的comment 显示 第1页 每页2条
// (因为默认page = 1 count = 10 所以默认最多为10条)
Expand All @@ -143,16 +142,14 @@ This example repo uses the NestJS swagger module for API documentation. [NestJS
},
"msgList[]": {
"Comment": {
"userId@": "User/id"
},
"count": 2,
"page": 1
"userId@": "User/id"
},
"count": 2,
"page": 1
}
}

```
![union-list-query](./asserts/union-list-query.png)


- 综合例子

Expand All @@ -174,6 +171,4 @@ This example repo uses the NestJS swagger module for API documentation. [NestJS
}
}
}
```

![mix](./asserts/mix.png)
```
Binary file removed asserts/column.png
Binary file not shown.
Binary file removed asserts/list.png
Binary file not shown.
Binary file removed asserts/mix.png
Binary file not shown.
Binary file removed asserts/union-list-query.png
Binary file not shown.
Binary file removed asserts/union-query.png
Binary file not shown.
Loading