org.komapper.dialect.oracle.OracleEntityUpdateStatementBuilder.kt Maven / Gradle / Ivy
package org.komapper.dialect.oracle
import org.komapper.core.BuilderDialect
import org.komapper.core.Statement
import org.komapper.core.StatementBuffer
import org.komapper.core.dsl.builder.DefaultEntityUpdateStatementBuilder
import org.komapper.core.dsl.builder.EntityUpdateStatementBuilder
import org.komapper.core.dsl.context.EntityUpdateContext
import org.komapper.core.dsl.metamodel.EntityMetamodel
class OracleEntityUpdateStatementBuilder>(
private val dialect: BuilderDialect,
private val context: EntityUpdateContext,
entity: ENTITY,
) : EntityUpdateStatementBuilder {
private val buf = StatementBuffer()
private val builder = DefaultEntityUpdateStatementBuilder(dialect, context, entity)
private val support = OracleStatementBuilderSupport(dialect, context)
override fun build(): Statement {
buf.append(builder.build())
buf.appendIfNotEmpty(support.buildReturning())
return buf.toStatement()
}
}