generate-db-wrappers
Generate database wrappers for all supported database engines
- License 许可
- MIT
- 最近更新
- 2026-09-30
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- description
- Generate database wrappers for all supported database engines
02 资源文件 6
03 SKILL.md 正文
Generate Database Wrappers
This workflow guides you through generating the database wrappers for SQLite, PostgreSQL, and MySQL. These wrappers provide a common interface for different database backends.
Prerequisites
- Nix environment: This project uses Nix for its development environment. You should run the following steps within
nix developor after loadingdirenv.
Workflow Steps
1. Generate Wrappers
Run sqlc generate followed by the go generate command for the pkg/database package. Both should be run within the Nix environment.
// turbo
nix develop --command bash -c "sqlc generate && go generate ./pkg/database"
2. Verify Generated Files
Ensure that the following files have been updated:
pkg/database/wrapper_sqlite.gopkg/database/wrapper_postgres.gopkg/database/wrapper_mysql.go
3. Lint and Format
After generating the wrappers, run the linting workflow to ensure the generated code is properly formatted and passes quality checks.
// turbo
nix develop --command golangci-lint run --fix
nix fmt
[!IMPORTANT] Do NOT edit these files manually. They are overwritten every time the generation tool is run. If you need to fix lint errors or change the logic, modify the generation tool or the
querier.gointerface.
04 同仓库更多 Skills
openspec-verify-change
Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
openspec-sync-specs
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
openspec-propose
Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
openspec-new-change
Start a new OpenSpec change using the experimental artifact workflow. Use when the user wants to create a new feature, fix, or modification with a structured step-by-step approach.
openspec-ff-change
Fast-forward through OpenSpec artifact creation. Use when the user wants to quickly create all artifacts needed for implementation without stepping through each one individually.
openspec-explore
Enter explore mode - a thinking partner for exploring ideas, investigating problems, and clarifying requirements. Use when the user wants to think through something before or during a change.