An open API service indexing awesome lists of open source software.

https://github.com/ousc/kotoframework-v2


https://github.com/ousc/kotoframework-v2

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

        

---
aliases:
- README
---
### Koto 是一个数据持久层框架,设计用于 Kotlin,轻量级,现代化。

Koto 2.0旨在通过编写kotlin k2编译器插件,实现更加强大且语义化的orm功能。

>示例:
```kotlin
//查询示例
// 1. 条件查询 / 查询单个字段 / 使用query()查询List结果
val users: List> = from()
.select { it.userName }.where { it.id == 1 }.query()

// 1.多条件查询 / 查询多个字段 / 带分页 / 带去重 / 带排序
val (users, total): List = from()
.select { it.userName + it.authCode + it.id }
.where { it.id == 1 && }
.page(1, 10)
.orderBy { it.updateTime.desc() }
.distinct()
.withTotal {
queryForList()
}

//连表查询