preparedStatement

open fun preparedStatement(@Language(value = "PostgreSQL") sql: String): BlockingPreparedStatement(source)

Creates a statement from the given SQL statement.

The returned statement must be closed, with a try-with-resource, for example.

Parameters

sql

An SQL statement that may contain one or more '?' IN parameter placeholders


open fun preparedStatement(@Language(value = "PostgreSQL") sql: String, columnIndexes: Array<Int>): BlockingPreparedStatement(source)

Creates a statement from the given SQL statement.

The returned statement must be closed, with a try-with-resource, for example.

Parameters

sql

An SQL statement that may contain one or more '?' IN parameter placeholders

columnIndexes

An array of column indexes indicating the columns that should be returned from the inserted row or rows


open fun preparedStatement(@Language(value = "PostgreSQL") sql: String, columnNames: Array<String>): BlockingPreparedStatement(source)

Creates a statement from the given SQL statement.

The returned statement must be closed, with a try-with-resource, for example.

Parameters

sql

An SQL statement that may contain one or more '?' IN parameter placeholders

columnNames

An array of column names indicating the columns that should be returned from the inserted row or rows