# ReturningStatement

open class ReturningStatement(val table: Table, val returningExpressions: List<Expression<*>>, val mainStatement: Statement<*>) : Statement<ResultApi>

Represents the underlying SQL mainStatement that returns a result with data from any modified rows.

#### Parameters

table

Table to perform the main statement on and return results from.

returningExpressions

Columns or expressions to include in the returned result.

mainStatement

The statement to append the RETURNING clause to. This may be an insert, update, or delete statement.

## Constructors

ReturningStatement
Link copied to clipboard
constructor(table: Table, returningExpressions: List<Expression<*>>, mainStatement: Statement<*>)

## Properties

mainStatement
Link copied to clipboard
val mainStatement: Statement<*>
returningExpressions
Link copied to clipboard
val returningExpressions: List<Expression<*>>
table
Link copied to clipboard
val table: Table
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.