update docs

This commit is contained in:
开源海哥 2023-04-09 10:49:04 +08:00
parent f1d07d5341
commit bf809f6098
3 changed files with 21 additions and 1 deletions

View File

@ -102,7 +102,7 @@ export default defineConfig({
"script",
{},
`
if (location.protocol !== 'https:') {
if (location.protocol !== 'https:' && location.hostname != 'localhost') {
location.href = 'https://' + location.hostname + location.pathname + location.search;
}
`

View File

@ -347,6 +347,25 @@ ON tb_account.id = a.id
WHERE tb_account.age >= ?
```
## union, union all
```java
QueryWrapper query = new QueryWrapper()
.select(ACCOUNT.ID)
.from(ACCOUNT)
.orderBy(ACCOUNT.ID.desc())
.union(select(ARTICLE.ID).from(ARTICLE))
.unionAll(select(ARTICLE.ID).from(ARTICLE));
```
其查询生成的 Sql 如下:
```sql
(SELECT id FROM tb_account ORDER BY id DESC)
UNION (SELECT id FROM tb_article)
UNION ALL (SELECT id FROM tb_article)
```
## limit... offset

View File

@ -83,6 +83,7 @@ public class AccountSqlTester {
QueryWrapper query = new QueryWrapper()
.select(ACCOUNT.ID)
.from(ACCOUNT)
.orderBy(ACCOUNT.ID.desc())
.union(select(ARTICLE.ID).from(ARTICLE))
.unionAll(select(ARTICLE.ID).from(ARTICLE));