From fce060ed2258e9d213bd4bd68792cc46ce583051 Mon Sep 17 00:00:00 2001 From: tursom Date: Thu, 19 Aug 2021 15:43:52 +0800 Subject: [PATCH] update --- build.gradle.kts | 6 +++--- gradlew | 0 .../kotlin/cn/tursom/database/WrapperEnhance.kt | 14 +++++++------- 3 files changed, 10 insertions(+), 10 deletions(-) mode change 100644 => 100755 gradlew diff --git a/build.gradle.kts b/build.gradle.kts index 5587491..2d54a25 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,7 +30,7 @@ ext["publishRepositories"] = { project: Project, p: PublishingExtension -> } } } catch (e: Exception) { - System.err.println("cannot push to repository tursom") + println("cannot push to repository tursom") } try { maven { @@ -44,7 +44,7 @@ ext["publishRepositories"] = { project: Project, p: PublishingExtension -> } } } catch (e: Exception) { - System.err.println("cannot push to repository github") + println("cannot push to repository github") } val repositoriesRegex = "repositories\\.[a-zA-z]*".toRegex() @@ -71,7 +71,7 @@ ext["publishRepositories"] = { project: Project, p: PublishingExtension -> } } } catch (e: Exception) { - System.err.println("cannot push to repository $repositoryName") + println("cannot push to repository $repositoryName") } } } diff --git a/gradlew b/gradlew old mode 100644 new mode 100755 diff --git a/ts-database/src/main/kotlin/cn/tursom/database/WrapperEnhance.kt b/ts-database/src/main/kotlin/cn/tursom/database/WrapperEnhance.kt index adb3802..205fe6d 100644 --- a/ts-database/src/main/kotlin/cn/tursom/database/WrapperEnhance.kt +++ b/ts-database/src/main/kotlin/cn/tursom/database/WrapperEnhance.kt @@ -214,29 +214,29 @@ inline fun > Func.notInSql( ): Children = notInSql(column.directTableField, value) -val groupBy: Func<*, String>.(Array) -> Any = Func<*, String>::groupBy +// val groupBy: Func<*, String>.(Array) -> Any = Func<*, String>::groupBy inline fun > Func.groupBy(column: KProperty1): Children = groupBy(column.directTableField) @Suppress("UNCHECKED_CAST") inline fun > Func.groupBy(vararg column: KProperty1): Children = - groupBy(column.directTableField) as Children + groupBy(column.directTableField.asList()) as Children -val orderByAsc: Func<*, String>.(Array) -> Any = Func<*, String>::orderByAsc +// val orderByAsc: Func<*, String>.(Array) -> Any = Func<*, String>::orderByAsc inline fun > Func.orderByAsc(column: KProperty1): Children = orderByAsc(column.directTableField) @Suppress("UNCHECKED_CAST") inline fun > Func.orderByAsc(vararg column: KProperty1): Children = - orderByAsc(column.directTableField) as Children + orderByAsc(column.directTableField.asList()) as Children -val orderByDesc: Func<*, String>.(Array) -> Any = Func<*, String>::orderByDesc +// val orderByDesc: Func<*, String>.(Array) -> Any = Func<*, String>::orderByDesc inline fun > Func.orderByDesc(column: KProperty1): Children = orderByDesc(column.directTableField) @Suppress("UNCHECKED_CAST") inline fun > Func.orderByDesc(vararg column: KProperty1): Children = - orderByDesc(column.directTableField) as Children + orderByDesc(column.directTableField.asList()) as Children /** @@ -314,7 +314,7 @@ object WrapperEnhance : AbstractWrapper() { wrapper.expression.add(ISqlSegment { columnToString(column) }, Regexp, ISqlSegment { val genParamName = Constants.WRAPPER_PARAM + (paramNameSeqField.get(wrapper) as AtomicInteger).incrementAndGet() wrapper.paramNameValuePairs[genParamName] = value - String.format(Constants.WRAPPER_PARAM_FORMAT, Constants.WRAPPER, genParamName) + "#{${Constants.WRAPPER}${Constants.WRAPPER_PARAM_MIDDLE}$genParamName}" }) return wrapper }