# QueryBuilder

class QueryBuilder(val prepared: Boolean)

An object to which SQL expressions and values can be appended.

## Constructors

QueryBuilder
Link copied to clipboard
constructor(prepared: Boolean)

## Properties

args
Link copied to clipboard
val args: List<Pair<IColumnType<*>, Any?>>

Returns the list of arguments used in this query.

prepared
Link copied to clipboard
val prepared: Boolean

Whether the query is parameterized or not.

## Functions

append
Link copied to clipboard
fun append(value: Char): QueryBuilder
fun append(value: String): QueryBuilder
fun append(value: Expression<*>): QueryBuilder

Appends the specified value to this QueryBuilder.

append
Link copied to clipboard
fun QueryBuilder.append(vararg expr: Any): QueryBuilder

Appends all arguments to this QueryBuilder.

appendTo
Link copied to clipboard
fun <T> Array<T>.appendTo(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", transform: QueryBuilder.(T) -> Unit)
fun <T> Iterable<T>.appendTo(separator: CharSequence = ", ", prefix: CharSequence = "", postfix: CharSequence = "", transform: QueryBuilder.(T) -> Unit)

Appends all the elements separated using separator and using the given prefix and postfix if supplied.

invoke
Link copied to clipboard
operator fun invoke(body: QueryBuilder.() -> Unit)
registerArgument
Link copied to clipboard
fun <T> registerArgument(column: Column<*>, argument: T)

Adds the specified argument as a value of the specified column.

fun <T> registerArgument(sqlType: IColumnType<*>, argument: T)

Adds the specified argument as a value of the specified sqlType.

registerArguments
Link copied to clipboard
fun <T> registerArguments(sqlType: IColumnType<*>, arguments: Iterable<T>)

Adds the specified sequence of arguments as values of the specified sqlType.

toString
Link copied to clipboard
open override fun toString(): String
unaryPlus
Link copied to clipboard
operator fun Char.unaryPlus(): QueryBuilder

Appends the receiver Char to this QueryBuilder.

operator fun String.unaryPlus(): QueryBuilder

Appends the receiver String to this QueryBuilder.

operator fun Expression<*>.unaryPlus(): QueryBuilder

Appends the receiver Expression to this QueryBuilder.