dbcli / dbcli/mssql-cli

Having access to raw results of the query would be handy

オープン
#532 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
1.4k
フォーク
191
PR マージ指標
30日以内にマージされた PR はありません

説明

This might be a duplicate of #231, but that was closed as fixed referencing [non-interactive output options](https://github.com/dbcli/mssql-cli/blob/master/doc/usage_guide.md#outputting-a-query-execution-in-non-interactive-mode). However that only talks about ways running in non-interactive mode and options to either send the results to file on standard out. That only gets us half the way there. Doing so still includes text in the result does not come from the query.

For example

`mssql-cli -S *** -U *** -P *** -Q "SET NOCOUNT ON; SELECT name FROM sys.databases"`

Yields this

```
Commands completed successfully.
+------------------------------------------+
| name |
|------------------------------------------|
| master |
| tempdb |
| model |
| msdb |
| Azurite_Blob |
| Mps_Configuration |
| Mps_653f5e5a-3fbb-44be-9e61-be90630a7187 |
+------------------------------------------+
Commands completed successfully.
```

While correct, that make consuming this output more difficult. Ideally there would an option so that the above query would yield this output
```
master
tempdb
model
msdb
Azurite_Blob
Mps_Configuration
Mps_653f5e5a-3fbb-44be-9e61-be90630a7187
```

My example may be an over simplification, newlines may not always be the best delimiter :smile:. So it may be handy to provide options to return the results in a standard format, here are a few that folks might find handy.
csv, tsv, json, yaml, xml, raw text

Most of the power of many command line tool does not come from running the tool in isolation, but instead comes from being able to combine it with other command line tools.

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

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

doc/usage_guide.md にある既存の非対話型出力オプションを読み、その後 issue の例のコマンドを再現して、どのステータステキストとテーブル形式が出力されるかを確認します。望ましい機械可読出力の動作とフォーマットオプションを定義し、追加のテキストなしで利用できるクエリ結果によって完了を示します。

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

評価

技術スタック
python, sql
領域
cli, databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

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

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