docs(article): add dev.to article "Why I Built a Go SQL Helper" (#39)#44
Conversation
kirill-scherba
left a comment
There was a problem hiding this comment.
Guard review — changes required
Verdict: fix required. The PR is structurally simple and fits the project: it adds a single marketing/article markdown file and does not change code, APIs, architecture, or operation order. Repository tests pass with go test ./..., and Memory Bank does not require an architecture/design update for this content-only change.
However, the article currently fails the task's own correctness/documentation standard: code snippets are presented as copy-pasteable, but at least one snippet contains a compile-time typo and the main quick-start snippet contains unused imports.
Architecture
- ✅ No runtime architecture changes.
- ✅ No public API changes.
- ✅ No database schema, migrations, protocols, or operation order changes.
- ✅ File placement under
articles/is reasonable for a publishable dev.to draft. - ✅ Memory Bank docs do not need updates because no architecture/design/operation-order decision changed.
Correctness blockers
-
Raw
database/sqlsnippet has a compile-time typo- In the first code block, the list loop scans into
&u.Aage. - The struct field used everywhere else is
Age;Aagedoes not exist. - Required fix: change
&u.Aageto&u.Age.
- In the first code block, the list loop scans into
-
Quick-start snippet imports unused packages
- The complete
package mainsnippet importserrorsandlog, but neither is used in that snippet. - As written, the snippet does not compile if copied directly.
- Required fix: either remove
errorsandlogfrom that snippet or add actual error handling that uses them.
- The complete
Docs consistency
- ✅ The six requested sections are present.
- ✅ Benchmark tables align with README/bench directionally and include a reproducibility command.
- ✅ The article references current v0.8.0-era features: type-safe WHERE helpers, native UPSERT, benchmarks, comparison example.
⚠️ The article should not claim copy-pasteable examples until the snippet issues above are fixed.
Verification observed
- ✅
go test ./...passes locally. - ❌ Article snippets need textual correction; repository tests do not validate markdown code fences.
No ai/approved label was added. After fixing the two snippet issues, this PR should be ready for approval.
| var users []User | ||
| for rows.Next() { | ||
| var u User | ||
| if err := rows.Scan(&u.ID, &u.Name, &u.Email, &u.Aage); err != nil { |
There was a problem hiding this comment.
This field is misspelled: User has Age, not Aage. The snippet will not compile as written. Change to &u.Age.
|
|
||
| import ( | ||
| "database/sql" | ||
| "errors" |
There was a problem hiding this comment.
The complete quick-start snippet imports errors, but the snippet never uses it. Remove the import or add error handling that uses errors.Is.
| "database/sql" | ||
| "errors" | ||
| "fmt" | ||
| "log" |
There was a problem hiding this comment.
The complete quick-start snippet imports log, but the snippet never uses it. Remove the import or add error handling that uses log.
kirill-scherba
left a comment
There was a problem hiding this comment.
Guard review — approved
Verdict: approved. The previous correctness blockers have been fixed, and no further changes are required.
Architecture
- ✅ The PR remains a content-only change: one new article markdown file under
articles/. - ✅ No runtime architecture, package boundaries, public API, database schema, migrations, protocols, or operation order changed.
- ✅ File placement is appropriate for a publishable dev.to draft kept in-repository.
- ✅ Memory Bank docs do not require updates because the change does not alter architecture, design decisions, current development state, or operational workflow.
Correctness
- ✅ The raw
database/sqlsnippet typo was fixed:&u.Aage→&u.Age. - ✅ The quick-start snippet no longer imports unused
errors/log; the complete snippet import block now matches actual usage. - ✅ The article covers all required issue sections: problem, existing solutions, sqlh architecture, CRUD walkthrough, benchmarks, and usage guidance.
- ✅ API references match the current project surface:
Create,Insert,InsertId,Get,List,Update,Delete,Count,Eq, andUpdateAttr. - ✅ Benchmark data is consistent with the existing README/bench module and includes a reproducibility command.
Verification
- ✅ Local repository tests pass:
go test ./.... - ✅ PR is mergeable according to GitHub (
mergeable: true). - ✅ No code comments or documentation text violate the English-only documentation rule.
Docs consistency
- ✅ The article aligns with existing README, benchmark, comparison example, and Memory Bank descriptions of sqlh.
- ✅ No Memory Bank update is needed for this article-only PR.
ai/approved label is being applied to both PR #44 and issue #39.
Hofmeister approvalDecision: added Rationale:
Next step by orchestrator: squash merge, delete source branch, move issue #39 to Done, add After merge (manual action required):
|
Closes #39
What
Adds the full dev.to article draft at
articles/dev-to-why-i-built-sqlh.md.Sections
Verification
Publishing
Related