2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

exposed-0.46でdeperecatedのワーニングが出る

exposedの0.46が出ていたので0.44 ⇒ 0.46にバージョンアップしてみると、

implementation("org.jetbrains.exposed:exposed-spring-boot-starter:0.46.0")

DSLで何やら、deprecatedなワーニングが・・・
image.png
slice()とselect()のところで出ていますね。

'slice(Expression<*>, vararg Expression<*>): FieldSet' is deprecated. As part of SELECT DSL design changes, this will be removed in future releases.
'select(SqlExpressionBuilder.() -> Op<Boolean>): Query' is deprecated. As part of SELECT DSL design changes, this will be removed in future releases.

0.46.0でDSLの書き方が変わったようです。
exposd公式のドキュメントを見ても、何がどう変わったのか明確にはかかれていません。
exposed DSL

ChangeLog.mdの0.46のところを見ると、

Features:
feat: EXPOSED-65 Design query DSL consistent with SQL language by @bog-walk in #1916
More details in the Migration guide

どうやらこれのようです。Migration guideを見ると、

// Example 1
// before
TestTable
    .slice(TestTable.columnA)
    .select { TestTable.columnA eq 1 }

// after
TestTable
    .select(TestTable.columnA)
    .where { TestTable.columnA eq 1 }

slice ⇒ select
select ⇒ where
に変わっています。上記のexposed DSLのドキュメントも、よく見ると

もこれに合わせた書き方に変わっています。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?