jsonContains

open fun jsonContains(target: Expression<*>, candidate: Expression<*>, path: String?, jsonType: IColumnType<*>, queryBuilder: QueryBuilder)

SQL function that checks whether a candidate expression is contained within a JSON target.

Parameters

target

JSON expression being searched.

candidate

Expression to search for in target.

path

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

jsonType

Column type of target to check, if casting to JSONB is required.

queryBuilder

Query builder to append the SQL function to.