-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
現在uroborosqlで提供されているINメソッドは以下のようなAPIを提供している。
agent().query(Product.class)
.in("productId", List.of(1, 2))
.collect();しかし、このAPIでは、複数カラムに対するIN句には対応できていないため、新たに複数カラムのIN句に対応するAPIを追加したい。
発行するSQLは以下のようになる
select
(productテーブルのカラム)
from product t
where
(t.product_id, t.product_name) in ((1, '商品1'), (2, '商品2'))これに対応するAPIは
var inParamBeans = List.of(new InParamBean(1, "商品1"), new InParamBean(2, "商品2")); // InParamBeanは productIdとproductNameをフィールドに持つJavaBean
agent().query(Product.class)
.in(inParamBeans)
.collect();Copilot