contains

fun ExpressionWithColumnType<*>.contains(candidate: Expression<*>, path: String? = null): Contains

Checks whether a candidate expression is contained within this JSON expression.

Parameters

candidate

Expression to search for in this JSON expression.

path

String representing JSON path/keys that match specific fields to search for candidate. Note: Optional path argument is not supported by all vendors; please check the documentation.

Samples

org.jetbrains.exposed.sql.json.JsonColumnTests.testJsonContains
fun <T> ExpressionWithColumnType<*>.contains(candidate: T, path: String? = null): Contains

Checks whether a candidate value is contained within this JSON expression.

Parameters

candidate

Value to search for in this JSON expression.

path

String representing JSON path/keys that match specific fields to search for candidate. Note: Optional path argument is not supported by all vendors; please check the documentation.

Samples

org.jetbrains.exposed.sql.json.JsonColumnTests.testJsonContains