File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
src/main/kotlin/org/mybatis/dynamic/sql/util/kotlin Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,18 @@ abstract class KotlinBaseBuilder<D : AbstractWhereSupport<*>> {
145145 or (existsPredicate, sc)
146146 }
147147
148+ /* *
149+ * This function does nothing, but it can be used to make some code snippets more understandable.
150+ *
151+ * For example, to count all rows in a table you can write either of the following:
152+ *
153+ * val rows = countFrom(foo) { }
154+ *
155+ * or
156+ *
157+ * val rows = countFrom(foo) { allRows() }
158+ */
159+ @SuppressWarnings(" EmptyFunctionBlock" )
148160 fun allRows () {}
149161
150162 private fun applyToWhere (block : AbstractWhereDSL <* >.() -> Unit ) {
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2016-2021 the original author or authors.
2+ * Copyright 2016-2022 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import kotlin.reflect.KClass
2727 * This function preserves the non-nullable column type which is lost with the Java
2828 * native versions.
2929 */
30+ @SuppressWarnings(" LongParameterList" )
3031fun <T : Any > SqlTable.column (
3132 name : String ,
3233 jdbcType : JDBCType ? = null,
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2016-2021 the original author or authors.
2+ * Copyright 2016-2022 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -188,6 +188,7 @@ fun NamedParameterJdbcTemplate.selectOne(
188188 this
189189 )
190190
191+ @SuppressWarnings(" SwallowedException" )
191192fun <T > NamedParameterJdbcTemplate.selectOne (
192193 selectStatement : SelectStatementProvider ,
193194 rowMapper : (rs: ResultSet , rowNum: Int ) -> T
@@ -197,6 +198,7 @@ fun <T> NamedParameterJdbcTemplate.selectOne(
197198 null
198199}
199200
201+ @SuppressWarnings(" SwallowedException" )
200202fun <T : Any > NamedParameterJdbcTemplate.selectOne (
201203 selectStatement : SelectStatementProvider ,
202204 type : KClass <T >
You can’t perform that action at this time.
0 commit comments