# ReplaceSelectStatement

open class ReplaceSelectStatement(columns: List<Column<*>>, selectQuery: AbstractQuery<*>) : InsertSelectStatement

Represents the SQL statement that uses data retrieved from a selectQuery to either insert a new row into a table, or, if insertion would violate a unique constraint, first delete the existing row before inserting a new row.

#### Parameters

columns

Columns to either insert values into or delete values from then insert into.

selectQuery

Source SELECT query that provides the values to insert.

## Constructors

ReplaceSelectStatement
Link copied to clipboard
constructor(columns: List<Column<*>>, selectQuery: AbstractQuery<*>)

## Properties

columns
Link copied to clipboard
val columns: List<Column<*>>
isIgnore
Link copied to clipboard
val isIgnore: Boolean
selectQuery
Link copied to clipboard
val selectQuery: AbstractQuery<*>
targets
Link copied to clipboard
val targets: List<Table>
type
Link copied to clipboard
val type: StatementType

## Functions

arguments
Link copied to clipboard
open override fun arguments(): Iterable<Iterable<Pair<IColumnType<*>, Any?>>>

Returns all mappings of columns and expression types to their values needed to prepare an SQL statement.

prepareSQL
Link copied to clipboard
open override fun prepareSQL(transaction: Transaction, prepared: Boolean = true): String

Returns the string representation of an SQL statement.