11package org.seasar.doma.criteria.query
22
33import org.seasar.doma.criteria.context.Criterion
4+ import org.seasar.doma.criteria.context.Operand
45import org.seasar.doma.criteria.context.UpdateContext
56import org.seasar.doma.def.EntityDef
67import org.seasar.doma.def.PropertyDef
@@ -10,7 +11,7 @@ import org.seasar.doma.jdbc.PreparedSql
1011import org.seasar.doma.jdbc.SqlKind
1112import org.seasar.doma.jdbc.SqlLogType
1213
13- class UpdateSqlBuilder (
14+ class UpdateBuilder (
1415 private val context : UpdateContext ,
1516 private val commenter : (String ) -> String ,
1617 private val buf : PreparedSqlBuilder ,
@@ -30,9 +31,9 @@ class UpdateSqlBuilder(
3031 if (context.set.isNotEmpty()) {
3132 buf.appendSql(" set " )
3233 context.set.forEach { (prop, param) ->
33- column(prop.value )
34+ column(prop)
3435 buf.appendSql(" = " )
35- param(param.value )
36+ param(param)
3637 buf.appendSql(" , " )
3738 }
3839 buf.cutBackSql(2 )
@@ -52,12 +53,12 @@ class UpdateSqlBuilder(
5253 support.table(entityDef)
5354 }
5455
55- private fun column (propDef : PropertyDef < * > ) {
56- support.column(propDef )
56+ private fun column (prop : Operand . Prop ) {
57+ support.column(prop )
5758 }
5859
59- private fun param (param : InParameter < * > ) {
60- buf.appendParameter (param)
60+ private fun param (param : Operand . Param ) {
61+ support.param (param)
6162 }
6263
6364 private fun visitCriterion (index : Int , c : Criterion ) {
0 commit comments