Files
dbtool-cli-v1/examples/README.md
Paperclip CTO d5f69462b0
Some checks failed
release-smoke / macos-13 / x86_64-apple-darwin (push) Has been cancelled
release-smoke / ubuntu-latest / x86_64-unknown-linux-gnu (push) Has been cancelled
release-smoke / windows-latest / x86_64-pc-windows-msvc (push) Has been cancelled
feat(usable): integrate current dbtool implementation snapshot
Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-02 08:26:18 +00:00

2.1 KiB

dbtool-cli-v1 Demo Assets

These assets give backend, frontend, and QA one small shared dataset for PostgreSQL, MySQL, and SQLite.

Current Status

  • Demo fixtures, seed scripts, and smoke inputs are staged.
  • PostgreSQL、MySQL 和 SQLite driver behavior now exists for connect, inspect, and query.
  • export execution to CSV / JSON now exists behind the shared query-result model.
  • Use these files as the shared data baseline for backend, frontend, and QA verification.

Layout

  • examples/fixtures/ — seed SQL per database plus expected assertions
  • examples/sql/ — happy-path and failure-path query inputs
  • examples/scripts/ — repeatable bootstrap helpers

Intended QA Coverage

  • connect against PostgreSQL, MySQL, SQLite
  • inspect schemas / tables / columns
  • query from inline SQL or file input
  • export to CSV / JSON from a known query

MySQL Bootstrap Note

  • examples/fixtures/mysql/init.sql 会显式授予 dbtool 用户对 qa_demo 的权限
  • 这样可避免 demo 容器默认库名与 QA 目标库名不一致时,dbtool 无法访问 qa_demo

PostgreSQL Bootstrap Note

  • docker-compose.demo.ymlscripts/tui/demo-stack.sh 现在保留 postgres 作为 demo 超级用户,密码为 dbtoolroot
  • examples/fixtures/postgres/init.sql 会把 dbtool 收敛为 NOSUPERUSER 的 app 用户,并只授予 dbtool_demo.qa_demo 的读权限
  • 若容器是在旧配置(POSTGRES_USER=dbtool)下初始化的,需要先 docker compose -f docker-compose.demo.yml down -vscripts/tui/demo-stack.sh reset 再重建,否则旧卷里的超级权限不会自动消失

SQLite Bootstrap Note

  • examples/scripts/bootstrap-sqlite.sh 现支持 sqlite3node:sqlitepython3 sqlite3 三种 seed 路径
  • SQLite demo inspect 语义使用 main 作为 schema 名称
  • SQLite demo query 目前按单条 statement 执行,多语句输入会明确失败

Known Blocker

The seed data is ready, and PostgreSQL / MySQL / SQLite query and export flows are implemented, but these assets still cannot serve as release evidence until the full smoke path runs in a Docker-capable environment.