From 51551d6c06b5d46a335d20b3037d1b4b6c349dc5 Mon Sep 17 00:00:00 2001 From: kamosama <837080904@qq.com> Date: Tue, 14 May 2024 13:53:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0kt=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=9B=B4=E5=A4=9A=E4=BD=BF=E7=94=A8=E7=9A=84=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh/intro/use-in-kotlin.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/zh/intro/use-in-kotlin.md b/docs/zh/intro/use-in-kotlin.md index f5b80c54..16d536a3 100644 --- a/docs/zh/intro/use-in-kotlin.md +++ b/docs/zh/intro/use-in-kotlin.md @@ -32,8 +32,7 @@ >- `all<实体类>()` 查泛型对应的表的所有数据 >- `filter<实体类>(vararg KProperty<*>, ()->QueryCondition)` 按条件查泛型对应的表的数据 >- `query<实体类>(QueryScope.()->Unit)` 较复杂查泛型对应的表的数据 (如: 分组,排序等) - >- `paginateWith(pageNumber: Number, pageSize: Number, totalRow: Number? = null, queryConditionGet: () -> QueryCondition): Page<实体类>` - 与 `paginate(pageNumber: Number, pageSize: Number, totalRow: Number? = null, init: QueryScope.() -> Unit): Page<实体类>` 使用分页的条件查询与较复杂查询 + - 简明地构建查询:通过中缀表达式➕扩展方法能更加简单明了的构建条件: * **【对比原生】** @@ -51,7 +50,10 @@ // 无需注册Mapper与APT/KSP即可查询操作 val accountList: List = query { select(Account::id, Account::userName) - where(Account::age.isNotNull) and { Account::age ge 17 } orderBy -Account::id + whereWith { + Account::age.isNotNull and (Account::age ge 17) + } + orderBy(-Account::id) } ``` 执行的SQL: @@ -102,3 +104,10 @@ 点击链接进入详情: - https://github.com/KAMO030/MyBatis-Flex-Kotlin#快速开始 - https://gitee.com/mybatis-flex/mybatis-flex-kotlin#快速开始 + +## 更多使用 + +- 功能 1:[Bootstrap简化配置](https://gitee.com/mybatis-flex/mybatis-flex-kotlin/blob/main/docs/bootstrapExt.md) +- 功能 2:[简单查询与扩展](https://gitee.com/mybatis-flex/mybatis-flex-kotlin/blob/main/docs/extensions.md) +- 功能 3:[向量查询](https://gitee.com/mybatis-flex/mybatis-flex-kotlin/blob/main/docs/vec.md) (实验性) +- 功能 4:[KSP](https://gitee.com/mybatis-flex/mybatis-flex-kotlin/blob/main/docs/ksp.md) From 6ea5989c5fc2a78bcc8db2ffcb8440a635104a40 Mon Sep 17 00:00:00 2001 From: kamosama <837080904@qq.com> Date: Tue, 14 May 2024 13:59:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0kt=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=AD=E7=9A=84=E5=88=86=E9=A1=B5=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/zh/intro/use-in-kotlin.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/zh/intro/use-in-kotlin.md b/docs/zh/intro/use-in-kotlin.md index 16d536a3..3a1127a3 100644 --- a/docs/zh/intro/use-in-kotlin.md +++ b/docs/zh/intro/use-in-kotlin.md @@ -32,7 +32,8 @@ >- `all<实体类>()` 查泛型对应的表的所有数据 >- `filter<实体类>(vararg KProperty<*>, ()->QueryCondition)` 按条件查泛型对应的表的数据 >- `query<实体类>(QueryScope.()->Unit)` 较复杂查泛型对应的表的数据 (如: 分组,排序等) - + >- `paginateWith(pageNumber: Number, pageSize: Number, totalRow: Number? = null, queryConditionGet: () -> QueryCondition): Page<实体类>` + 与 `paginate(pageNumber: Number, pageSize: Number, totalRow: Number? = null, init: QueryScope.() -> Unit): Page<实体类>` 使用分页的条件查询与较复杂查询 - 简明地构建查询:通过中缀表达式➕扩展方法能更加简单明了的构建条件: * **【对比原生】**