Skip to content

feat(sqlite): add sqlite3 filter with table output compression#1972

Open
prolifel wants to merge 1 commit into
rtk-ai:developfrom
prolifel:feat/sqlite3-filter
Open

feat(sqlite): add sqlite3 filter with table output compression#1972
prolifel wants to merge 1 commit into
rtk-ai:developfrom
prolifel:feat/sqlite3-filter

Conversation

@prolifel
Copy link
Copy Markdown

Summary

  • Adds sqlite3 command filter in src/cmds/cloud/sqlite_cmd.rs
  • Detects and compresses list, column, and line output formats
  • Caps output at 50 data rows with overflow indicator
  • Dot-commands (.tables, .schema) and errors passthrough unchanged
  • Registered as rtk sqlite with hook-based rewriting from sqlite3

Changes

  • New: src/cmds/cloud/sqlite_cmd.rs - filter module with 15 tests
  • Modified: src/main.rs - Command enum, routing, import, operational check
  • Modified: src/discover/rules.rs - sqlite3 rewrite rule
  • Modified: src/discover/registry.rs - classification and rewrite tests

Test plan

  • cargo fmt --all && cargo clippy --all-targets && cargo test --all
  • Manual: rtk sqlite mydb.db "SELECT * FROM users;" verifies tab-separated output
  • Manual: rtk sqlite mydb.db ".tables" passes through unchanged

🤖 Generated with Claude Code

Detects list (pipe-separated), column (aligned), and line (key=value)
output formats and compresses to compact tab-separated representation.
Caps at 50 rows with overflow indicator. Dot-commands (.tables,
.schema) and errors pass through unchanged since they're already
compact.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 19, 2026

CLA assistant check
All committers have signed the CLA.

@prolifel
Copy link
Copy Markdown
Author

related with #1253
kindly review @FlorianBruniaux
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants