Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EntityClass#test(id) and support update { it[nullable] = nullable } #1277

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Commits on Jun 19, 2021

  1. Configuration menu
    Copy the full SHA
    1b24418 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c2df46d View commit details
    Browse the repository at this point in the history
  3. Add EntityClass#testCache(id: ID)

    vlsi committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    2c616ec View commit details
    Browse the repository at this point in the history
  4. Support update { it[column] = nullableValue }

    Key change is UpdateBuilder#setWithEntityIdValue, which now accepts
    column: Column<out EntityID<S>?>, value: S?
    previous signature was
    column: Column<out EntityID<S>>, value: S?
    
    A downside is that "[optionalReferenceColumn] = null" can't decide between
    "null as ColumnType?" and "null as EntityID<ColumnType>?"
    
    update {
      // it[optionalReferenceColumn] = null // <- does not work
      // Workaround: specify null type explicitly to call the proper overload
      it[optionalReferenceColumn] = null as EntityID<ColumnType>?
      // The following works as well:
      // it[optionalReferenceColumn] = null as ColumnType?
    }
    
    fixes JetBrains#1275
    vlsi committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    24c731a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    97fc481 View commit details
    Browse the repository at this point in the history
  6. Improve error reporting when user inserts NULL into non-nullable column

    * Exception message would include the relevant table and column name
    * LiteralOp(...) and QueryParameter(...) would fail if user creates NULL value for non-nullable type
    * Single-value QueryBuilder#registerArgument is slightly faster as it no longer creates list
    
    fixes JetBrains#1268
    vlsi committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    c9c87c3 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2021

  1. Configuration menu
    Copy the full SHA
    f0029de View commit details
    Browse the repository at this point in the history