ktorm
ktorm copied to clipboard
A lightweight ORM framework for Kotlin with strong-typed SQL DSL and sequence APIs.
Is it possible to use the native entity DSL to perform a `group by` on multiple columns? ``` database.sales.groupingBy { it.salesRegion, it.productFamily, it.month, it.channel }.aggregateColumns { sum(it.salesVolume) } ``` I...
I used `org.ktorm.ksp.api.EnumConverter` for defining column converter in version `1.0.0-RC3`. ```kotlin import org.ktorm.ksp.api.EnumConverter import org.ktorm.schema.BaseTable import org.ktorm.schema.Column import org.ktorm.schema.int import kotlin.reflect.KClass object IntEnumConverter : EnumConverter { override fun convert(table: BaseTable,...
This issue is created for PR #524. The origin PR was closed accidentally because the target branch was deleted.
This resolved #512
I'm very new to kotlin and to ktorm too, so may be I'm missing something simple ... However I was not able to plain read an Oracle Timestamp columns (oracle.sql.TIMESTAMP)...
DSL例如 ``` data class Page(val pageNo: Int, val pageSize: Int, val totalRecords: Int, val records: Query) fun Query.paging(pageNo: Int, pageSize: Int): Page { val records = this.limit(pageSize).offset((pageNo - 1) *...
通过元数据里的**maxColumnNameLength** 和拼接后的字段 来进行比较长度,导致因为拼接了表别名的原因遭到ColumnNameChecker 拦截   
实现 `@SuperTableClass` 注解, 使用案例见 https://github.com/kotlin-orm/ktorm/pull/561#issuecomment-2167999715
Given the simple example as provided in the documentation provided (see https://www.ktorm.org/en/query.html) ```kt val query = database.from(Employees).select() query .map { row -> Emp(row[Employees.id], row[Employees.name], row[Employees.salary]) } ``` this will actually...
We're using the data class based table definitions by subclassing the BaseTable class so we can write generics for the sql dsl. We are constantly running into the issue that...