[PLAN REVIEW] Multi-column IN clause support for DAO query interface
Status: AWAITING PLAN REVIEW ⏳
This PR currently contains only the modification plan document for adding multi-column IN clause support. Implementation will proceed after plan review and approval per the requirement: "まずはこのAPIを追加するための改修計画を立て、レビューの結果OKが出たら改修計画に従って修正を行ってください"
Modification Plan
Please review MODIFICATION_PLAN.md which contains a comprehensive plan including:
- 概要 - Overview and problem statement
- 現状の問題点 - Current limitations
- 目標とする実装 - Target implementation and API design
- 修正対象ファイル - Files to be modified with detailed change descriptions
- 技術的詳細 - Technical implementation details (reflection, column mapping, parameter binding)
- 既存機能への影響 - Impact analysis on existing features
- 実装手順 - Step-by-step implementation plan
- リスク分析 - Risk analysis and mitigation strategies
- 完了条件 - Completion criteria
- レビューポイント - Key review points
Proposed API (from plan)
The plan proposes adding support for IN clauses spanning multiple columns in entity queries. The current in() method only supports single-column conditions; this would add an overload accepting beans to enable multi-column tuple matching.
var inParamBeans = List.of(
new InParamBean(1, "商品1"),
new InParamBean(2, "商品2")
);
agent().query(Product.class)
.in(inParamBeans)
.collect();
Would generate:
WHERE (PRODUCT_ID, PRODUCT_NAME) IN ((?, ?), (?, ?))
Next Steps
- ✅ Modification plan created (MODIFICATION_PLAN.md)
- ⏳ Awaiting plan review and approval
- ⬜ Implementation (after approval)
- ⬜ Testing and validation
- ⬜ Final review
- Addresses future-architect/uroborosql#373
Original prompt
This section details on the original issue you should resolve
<issue_title>DAOインタフェースのin() メソッドで複数列に対する条件指定ができるようにする</issue_title> <issue_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();</issue_description>
<agent_instructions>まずはこのAPIを追加するための改修計画を立て、レビューの結果OKが出たら改修計画に従って修正を行ってください</agent_instructions>
Comments on the Issue (you are @copilot in this section)
- Fixes future-architect/uroborosql#373
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.