From 47d4006569edb7802a4fb6f8db3ec5b43721437d Mon Sep 17 00:00:00 2001 From: Yongshun Shreck Ye Date: Mon, 25 Nov 2024 20:48:42 +0800 Subject: [PATCH] Add a version of `selectWithMapper` without `buildQuery` --- .../sql/mapping/DatabaseClientSqlWithMapper.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql-dsl-with-mapper/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/sql/mapping/DatabaseClientSqlWithMapper.kt b/sql-dsl-with-mapper/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/sql/mapping/DatabaseClientSqlWithMapper.kt index 2563e6a..b45c68e 100644 --- a/sql-dsl-with-mapper/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/sql/mapping/DatabaseClientSqlWithMapper.kt +++ b/sql-dsl-with-mapper/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/sql/mapping/DatabaseClientSqlWithMapper.kt @@ -35,6 +35,12 @@ suspend fun DatabaseClient<*>.selectWithMapper( ) = executeQueryWithMapper(columnSet.select(dataQueryMapper.neededColumns).buildQuery(), dataQueryMapper) +@ExperimentalEvscApi +suspend fun DatabaseClient<*>.selectWithMapper( + columnSet: ColumnSet, dataQueryMapper: DataQueryMapper +) = + selectWithMapper(columnSet, dataQueryMapper) { this } + @ExperimentalEvscApi suspend fun DatabaseClient<*>.insertWithMapper( table: Table, data: Data, dataUpdateMapper: DataUpdateMapper