English | 简体中文

api-docs / org.ktorm.expression / InsertFromQueryExpression

InsertFromQueryExpression

data class InsertFromQueryExpression : SqlExpression (source code)

Insert-from-query expression, eg. insert into tmp(num) select 1 from dual.

Constructors

NameSummary

<init>

InsertFromQueryExpression(
    table: TableExpression,
    columns: List<ColumnExpression<*>>,
    query: QueryExpression,
    isLeafNode: Boolean = false,
    extraProperties: Map<String, Any> = emptyMap())

Insert-from-query expression, eg. insert into tmp(num) select 1 from dual.

Properties

NameSummary

columns

val columns: List<ColumnExpression<*>>

the columns to be inserted.

extraProperties

val extraProperties: Map<String, Any>

Extra properties of this expression, maybe useful in SqlFormatter to generate some special SQLs.

isLeafNode

val isLeafNode: Boolean

Check if this expression is a leaf node in expression trees.

query

val query: QueryExpression

the query expression.

table

val table: TableExpression

the table to be inserted.

Extension Functions

NameSummary

eq

infix fun <T : Any> T.eq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Equal operator, translated to = in SQL.

neq

infix fun <T : Any> T.neq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.

notEq

infix fun <T : Any> T.notEq(
    expr: ColumnDeclaring<T>
): BinaryExpression<Boolean>

Not-equal operator, translated to <> in SQL.