[add] --no-fetch-dataオプションを追加 - #51
Merged
Merged
Conversation
クエリを実行するがデータを取得しないモードを実装 - CommandArgsにno_fetch_dataフィールドを追加 - CLIに--no-fetch-dataオプションを追加 - 実行時に行数と実行時間のみを表示(例: Query OK, 10 rows (0.0234s)) - 構文チェックやDMLクエリの実行に最適 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
psql風の-cオプションを実装 - -c/--commandオプションでクエリを指定し、REPLに入らずに実行して終了 - スクリプトや自動化に便利 - --no-fetch-dataと組み合わせて使用可能 - データソース(-d)の指定が必須 使用例: redasql -c "SELECT COUNT(*) FROM users" -d mydb redasql -c "UPDATE users SET status='active'" -d mydb --no-fetch-data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
tool.poetry.dev-dependencies を tool.poetry.group.dev.dependencies に変更 - Poetry の新しい依存関係グループ形式に対応 - 実行時のwarningが表示されなくなる 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
-cオプション使用時にクエリが`;`で終わっていない場合は自動追加 - psqlと同様の動作を実現 - `redasql -c "SELECT 1" -d mydb` が動作するように - 既に`;`がある場合は重複しないように処理 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
actions/cache, actions/checkout, actions/setup-pythonを最新版に更新 - actions/cache@v2 -> v4 (v2は廃止されてエラーになる) - actions/checkout@v2 -> v4 - actions/setup-python@v1 -> v5 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Poetry 2.3.2 のインストールに失敗する問題を回避 - snok/install-poetry@v1 で version: 1.8.3 を明示的に指定 - 安定版を使用することでCIの信頼性を向上 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
pyproject.toml変更に伴うlockファイルの更新 - tool.poetry.dev-dependencies -> tool.poetry.group.dev.dependencies への変更を反映 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Ubuntu 24.04ではdocker-composeコマンドが廃止され、docker composeに統合 - ハイフンなしの`docker compose`コマンドを使用 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
クエリを実行するがデータを取得しないモードと、単体クエリ実行モードを実装しました。
追加機能
--no-fetch-dataオプション: クエリの構文チェックやDMLクエリの実行時にデータ転送のオーバーヘッドを削減-cオプション: REPLに入らずに単体のクエリを実行して終了(psql風)変更内容
redasql/dto.py:CommandArgsにno_fetch_dataとcommandフィールドを追加redasql/command.py: CLI引数パーサーに--no-fetch-dataと-c/--commandオプションを追加redasql/command.py:execute_query_handler()で no-fetch-data モード時の簡潔な出力を実装redasql/command.py:main()で -c オプション使用時の単体クエリ実行を実装redasql/command.py: -c オプション使用時にセミコロンを自動追加(psqlと同様)redasql/api_client.py:ApiClientにno_fetch_dataパラメータを追加(将来の拡張用)pyproject.toml: poetry の deprecation warning を解消動作
--no-fetch-data オプション
通常モード:
no-fetch-dataモード:
-c オプション
REPLモード(従来):
単体クエリ実行モード(新機能):
使用例
Test plan
--no-fetch-dataオプションを正しく認識する-cオプションを正しく認識するCommandArgsがno_fetch_dataとcommandフィールドを保持する--no-fetch-dataオプションが正しく動作することを確認-cオプションが正しく動作することを確認-cと--no-fetch-dataの組み合わせが正しく動作することを確認🤖 Generated with Claude Code