Azure / Azure/data-api-builder

[Enh]: introduce `dab update <stored-proc> --parameter <param-name> --<property-name> <property-value>`

オープン
#3,191 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
2.x cli stored-procedure
主要言語
C#
スター
1.5k
フォーク
370
平均マージ
3日 22時間
マージ済み PR(30日)
9

説明

## What?

Introduce:

```
dab update \
--parameter \
--
```

This allows updating a single stored procedure parameter without redefining all parameters.

## Why?

Today, modifying a single parameter requires redefining every parameter.

Also, this is

### Example of the problem

To change just one default value, you must restate all parameters:

```
dab update UpdateCustomerPreferences \
--parameters.name "CustomerID,EmailNotifications,SMSNotifications,PreferredCurrency,MarketingOptIn" \
--parameters.description "Customer ID to update,Enable email notifications for orders and promotions,Enable SMS notifications for shipping updates,Preferred billing currency (ISO 4217 code),Opt in to marketing communications" \
--parameters.required "true,false,false,false,false" \
--parameters.default ",true,false,EUR,false"
```

Even though only `PreferredCurrency` changed.

### Example of the solution

Update only the intended parameter:

```
dab update UpdateCustomerPreferences \
--parameter PreferredCurrency \
--default=EUR
```

Update description:

```
dab update FindProducts \
--parameter SearchText \
--description "This is the new description value."
```

## How?

* Keep supporting the existing bulk parameter syntax.
* Introduce targeted parameter mutation syntax.
* Update documentation to recommend the new approach.
* Leave legacy syntax for full parameter redefinition scenarios.

### Output

* When legacy syntax is used, output/log the new syntax preference.
```
Using legacy parameter syntax.

Consider using targeted syntax:

dab add \
--parameter \
--property-name

dab update \
--parameter \
--property-name
```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、既存の `dab update` コマンドとその一括パラメーター構文を追跡し、次に関連する CLI テストとドキュメントを調べます。対象を指定した更新でストアドプロシージャーのパラメーターのプロパティを 1 つ変更でき、レガシーの一括再定義が推奨される構文の出力で引き続き機能し、ドキュメント化された例で新しい形式を推奨していれば、変更は完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp
領域
cli, databases
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。