From b1ad3c5a390b4380d76f27a3521823fb24059013 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 20 Apr 2022 18:22:21 +0600 Subject: [PATCH 1/4] start 0.9.23 --- CHANGELOG.md | 2 ++ gradle.properties | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f398f836d57..45fee4d96f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +## 0.9.23 + ## 0.9.22 * `Ktor`: diff --git a/gradle.properties b/gradle.properties index 1c89047d5db..05b78a91bb6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -14,5 +14,5 @@ crypto_js_version=4.1.1 # Project data group=dev.inmo -version=0.9.22 -android_code_version=112 +version=0.9.23 +android_code_version=113 From b5eac3778211b1a6728871c71f364c3a80b812de Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 20 Apr 2022 18:36:36 +0600 Subject: [PATCH 2/4] improvements in ExposedCRUDRepo --- CHANGELOG.md | 4 ++++ .../dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45fee4d96f4..0db2cd8bd77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## 0.9.23 +* `Repos`: + * `Exposed`: + * New property `ExposedCRUDRepo#selectAll` to retrieve all the rows in the table + ## 0.9.22 * `Ktor`: diff --git a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt index a7505f5e727..87f812cf8f2 100644 --- a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt +++ b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt @@ -5,4 +5,6 @@ import org.jetbrains.exposed.sql.* interface ExposedCRUDRepo : ExposedRepo { val ResultRow.asObject: ObjectType val selectById: SqlExpressionBuilder.(IdType) -> Op + val selectAll: Transaction.() -> Query + get() = { (this as FieldSet).selectAll() } } From be4aa8daac83e75d1c9fe9fa66ed45df3ae3678f Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 20 Apr 2022 23:14:06 +0600 Subject: [PATCH 3/4] fixes in inheritance of interfaces --- .../dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt | 2 -- .../dev/inmo/micro_utils/repos/exposed/ExposedRepo.kt | 8 +++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt index 87f812cf8f2..a7505f5e727 100644 --- a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt +++ b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedCRUDRepo.kt @@ -5,6 +5,4 @@ import org.jetbrains.exposed.sql.* interface ExposedCRUDRepo : ExposedRepo { val ResultRow.asObject: ObjectType val selectById: SqlExpressionBuilder.(IdType) -> Op - val selectAll: Transaction.() -> Query - get() = { (this as FieldSet).selectAll() } } diff --git a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedRepo.kt b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedRepo.kt index e2840eab68e..33705a71ef3 100644 --- a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedRepo.kt +++ b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/ExposedRepo.kt @@ -1,8 +1,10 @@ package dev.inmo.micro_utils.repos.exposed import dev.inmo.micro_utils.repos.Repo -import org.jetbrains.exposed.sql.Database +import org.jetbrains.exposed.sql.* -interface ExposedRepo : Repo { +interface ExposedRepo : Repo, FieldSet { val database: Database -} \ No newline at end of file + val selectAll: Transaction.() -> Query + get() = { (this@ExposedRepo as FieldSet).selectAll() } +} From 6a5ad4d728ead9eff8d051042befb6ebb899b007 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 20 Apr 2022 23:41:59 +0600 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0db2cd8bd77..d8f64900929 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ * `Repos`: * `Exposed`: - * New property `ExposedCRUDRepo#selectAll` to retrieve all the rows in the table + * New property `ExposedRepo#selectAll` to retrieve all the rows in the table ## 0.9.22