diff --git a/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt b/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt index 8a8f85adf3..d5ab8c36b9 100644 --- a/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt +++ b/jOOQ-kotlin/src/main/kotlin/org/jooq/kotlin/Extensions.kt @@ -1,7 +1,6 @@ package org.jooq.kotlin import org.jooq.* -import org.jooq.impl.DSL.* import java.util.stream.Collector // ---------------------------------------------------------------------------- @@ -406,75 +405,75 @@ fun .and(other: Condition): Condition = condition(this).and(other) +fun Field.and(other: Condition): Condition = condition(this as Boolean?).and(other) @Support -fun Field.and(other: Field): Condition = condition(this).and(other) +fun Field.and(other: Field): Condition = condition(this as Boolean?).and(other) @Support @PlainSQL -fun Field.and(sql: SQL): Condition = condition(this).and(sql) +fun Field.and(sql: SQL): Condition = condition(this as Boolean?).and(sql) @Support @PlainSQL -fun Field.and(sql: String): Condition = condition(this).and(sql) +fun Field.and(sql: String): Condition = condition(this as Boolean?).and(sql) @Support @PlainSQL -fun Field.and(sql: String, vararg bindings: Any): Condition = condition(this).and(sql, bindings) +fun Field.and(sql: String, vararg bindings: Any): Condition = condition(this as Boolean?).and(sql, bindings) @Support @PlainSQL -fun Field.and(sql: String, vararg parts: QueryPart): Condition = condition(this).and(sql, parts) +fun Field.and(sql: String, vararg parts: QueryPart): Condition = condition(this as Boolean?).and(sql, parts) @Support -fun Field.andNot(other: Condition): Condition = condition(this).andNot(other) +fun Field.andNot(other: Condition): Condition = condition(this as Boolean?).andNot(other) @Support -fun Field.andNot(other: Field): Condition = condition(this).andNot(other) +fun Field.andNot(other: Field): Condition = condition(this as Boolean?).andNot(other) @Support -fun Field.andExists(select: Select<*>): Condition = condition(this).andExists(select) +fun Field.andExists(select: Select<*>): Condition = condition(this as Boolean?).andExists(select) @Support -fun Field.andNotExists(select: Select<*>): Condition = condition(this).andNotExists(select) +fun Field.andNotExists(select: Select<*>): Condition = condition(this as Boolean?).andNotExists(select) @Support -fun Field.or(other: Condition): Condition = condition(this).or(other) +fun Field.or(other: Condition): Condition = condition(this as Boolean?).or(other) @Support -fun Field.or(other: Field): Condition = condition(this).or(other) +fun Field.or(other: Field): Condition = condition(this as Boolean?).or(other) @Support @PlainSQL -fun Field.or(sql: SQL): Condition = condition(this).or(sql) +fun Field.or(sql: SQL): Condition = condition(this as Boolean?).or(sql) @Support @PlainSQL -fun Field.or(sql: String): Condition = condition(this).or(sql) +fun Field.or(sql: String): Condition = condition(this as Boolean?).or(sql) @Support @PlainSQL -fun Field.or(sql: String, vararg bindings: Any): Condition = condition(this).or(sql) +fun Field.or(sql: String, vararg bindings: Any): Condition = condition(this as Boolean?).or(sql) @Support @PlainSQL -fun Field.or(sql: String, vararg parts: QueryPart): Condition = condition(this).or(sql, parts) +fun Field.or(sql: String, vararg parts: QueryPart): Condition = condition(this as Boolean?).or(sql, parts) @Support -fun Field.orNot(other: Condition): Condition = condition(this).orNot(other) +fun Field.orNot(other: Condition): Condition = condition(this as Boolean?).orNot(other) @Support -fun Field.orNot(other: Field): Condition = condition(this).orNot(other) +fun Field.orNot(other: Field): Condition = condition(this as Boolean?).orNot(other) @Support -fun Field.orExists(select: Select<*>): Condition = condition(this).orExists(select) +fun Field.orExists(select: Select<*>): Condition = condition(this as Boolean?).orExists(select) @Support -fun Field.orNotExists(select: Select<*>): Condition = condition(this).orNotExists(select) +fun Field.orNotExists(select: Select<*>): Condition = condition(this as Boolean?).orNotExists(select) @Support -fun Field.not(): Condition = condition(this).not() +fun Field.not(): Condition = condition(this as Boolean?).not() // ---------------------------------------------------------------------------- @@ -498,10 +497,10 @@ operator fun TableLike<*>.get(field: Field) = this.field(field) // ---------------------------------------------------------------------------- @Support -operator fun Field>.get(index: Int) = arrayGet(this, index) +operator fun Field?>.get(index: Int) = arrayGet(this as Field?>, index) @Support -operator fun Field>.get(index: Field) = arrayGet(this, index) +operator fun Field?>.get(index: Field) = arrayGet(this as Field?>, index as Field) // ---------------------------------------------------------------------------- // Extensions to make Select> a scalar subquery of type Field