Skip to content

Commit

Permalink
Why setting value multiple times to UpdateBuilder fails? JetBrains#1177
Browse files Browse the repository at this point in the history
  • Loading branch information
Tapac authored and SchweinchenFuntik committed Oct 23, 2021
1 parent e2cbe64 commit ddc77c3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ interface IColumnType {
}

/**
* Function checks that provided value suites the column type and throws [IllegalArgumentException] otherwise.
* Function checks that provided value is suites the column type and throws [IllegalArgumentException] otherwise.
* [value] can be of any type (including [Expression])
* */
@Throws(IllegalArgumentException::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ abstract class UpdateBuilder<out T>(type: StatementType, targets: List<Table>) :

open operator fun <S> set(column: Column<S>, value: S) {
when {
values.containsKey(column) -> error("$column is already initialized")
!column.columnType.nullable && value == null -> error("Trying to set null to not nullable column $column")
else -> {
column.columnType.validateValueBeforeUpdate(value)
Expand Down

0 comments on commit ddc77c3

Please sign in to comment.