Skip to content

feat: submit sqlh to awesome-go, add missing tests and badge (#38)#43

Merged
kirill-scherba merged 2 commits into
mainfrom
feature/38
Jun 12, 2026
Merged

feat: submit sqlh to awesome-go, add missing tests and badge (#38)#43
kirill-scherba merged 2 commits into
mainfrom
feature/38

Conversation

@kirill-scherba

Copy link
Copy Markdown
Owner

This PR prepares sqlh for the awesome-go list submission (issue #38) and adds missing test coverage for previously untested helper functions.

Changes

Quality improvements for awesome-go criteria

  • Added tests for SetWheresJoinAnd, SetDistinct, SetName, SetNumRows/GetNumRows
  • Added test for InsertWithCallback error/rollback path
  • Added test for Table[T].InsertId wrapper
  • Added test for Table[T].Close no-op behavior
  • Added test for getLastInsertID SQLite path (via transaction)
  • Added test for detectDialect and dialectFromQuerier with *sql.Tx fallback
  • Added test for rebind passthrough for non-PostgreSQL dialects

Documentation

  • Added "Mentioned in Awesome Go" badge to README.md
  • Updated docs/progress.md with awesome-go submission status
  • Updated docs/projectbrief.md with current version and distribution links

awesome-go PR

  • Forked avelino/awesome-go → kirill-scherba/awesome-go
  • Submitted PR #6401 to avelino/awesome-go (SQL Query Builders section)
  • Entry is alphabetically ordered and follows awesome-go formatting rules

Verification

  • All tests pass (go test ./...)
  • Main package coverage: ~75% (improved from ~73%)
  • First commit: 2024-09-21 (well over 5 months)
  • SemVer releases: v0.8.0, v0.7.1, v0.7.0, etc.
  • CI configured: .github/workflows/test.yml with SQLite, MySQL, PostgreSQL
  • BSD-3 license, go.mod, README, pkg.go.dev docs present

Closes #38

@kirill-scherba kirill-scherba left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: REQUEST CHANGES

Architecture

  • The PR keeps the implementation architecture intact: no production API or SQL generation path is changed, and the added tests are isolated in the existing SQLite test suite. That part fits the existing design.

Correctness

  • Blocking: README.md adds the Mentioned in Awesome Go badge before sqlh is actually accepted/listed in avelino/awesome-go. The upstream PR is still open (avelino/awesome-go#6401), so this badge is currently a false project status signal. awesome-go's own CONTRIBUTING guide presents this badge under the post-acceptance section ("Congrats, your project got accepted - what now"), not as a submission badge. Do not merge this badge until the upstream PR is accepted. Fix by either removing the README badge from this PR, or replacing it with a neutral note elsewhere that says the submission PR is pending.
  • Non-blocking cleanup: the TestGetLastInsertID/Unsupported driver subtest name/comment does not match what it tests. It opens SQLite and asserts detectDialect(db) does not panic; it does not cover an unsupported driver. Rename the subtest/comment to reflect the real behavior, or add a true fake-driver test if unsupported-driver coverage is intended.

Tests

  • go test ./... passes locally in the worktree.
  • The added tests improve coverage for helper constructors, rollback behavior, table wrapper InsertId, SQLite getLastInsertID, and dialect fallback for *sql.Tx. No production behavior regression found.

Docs / Memory Bank consistency

  • docs/progress.md and docs/projectbrief.md were updated, which is correct because this PR changes project distribution/marketing status.
  • However, README docs are not consistent with reality until awesome-go accepts the upstream PR. Keep Memory Bank entries that say "submitted / awaiting review"; remove the accepted-status badge from README until acceptance.

Required fix before approval

  1. Remove the Mentioned in Awesome Go badge from README.md until avelino/awesome-go#6401 is merged.
  2. Optionally rename the misleading Unsupported driver test subcase/comment.

No ai/approved label added.

@kirill-scherba kirill-scherba left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Architecture

  • The PR remains correctly scoped: no production API, SQL generation, or transaction semantics are changed.
  • Added tests are isolated to the existing SQLite-focused test suite and exercise helper constructors, callback rollback behavior, table wrapper delegation, SQLite getLastInsertID, dialect detection, *sql.Tx fallback handling, and non-PostgreSQL rebind passthrough.
  • The prior README badge issue is fixed: the repository no longer claims accepted awesome-go status before upstream acceptance.

Correctness

  • The blocking issue from the previous review is resolved: the premature Mentioned in Awesome Go badge was removed from README.md.
  • The misleading Unsupported driver subtest was renamed to detectDialect does not panic with real driver, and its comment now matches the actual behavior under test.
  • The awesome-go submission status remains correctly represented as pending via avelino/awesome-go#6401.
  • No behavior regressions found in the production code because only tests and documentation are changed.

Tests

  • Verified locally in the worktree with go test -count=1 ./....
  • Result: all packages pass.

Docs / Memory Bank consistency

  • docs/progress.md now correctly says the README badge is deferred until upstream acceptance.
  • docs/projectbrief.md accurately records that sqlh was submitted to awesome-go PR #6401, without claiming acceptance.
  • Documentation state is now consistent with the actual repository state and upstream PR lifecycle.

No blocking issues remain. ai/approved labels may be applied to PR #43 and issue #38.

@kirill-scherba

Copy link
Copy Markdown
Owner Author

Approved after fixes review.

All review findings from the earlier round were resolved:

  1. Premature Mentioned in Awesome Go badge removed from README.
  2. Misleading Unsupported driver subtest renamed and commented correctly.
  3. Memory Bank docs (docs/progress.md, docs/projectbrief.md) updated to reflect pending status.

ai/approved was already set on PR #43 and issue #38. approved label added — orchestrator will merge automatically.

@kirill-scherba kirill-scherba merged commit 777ed6a into main Jun 12, 2026
6 checks passed
@kirill-scherba kirill-scherba deleted the feature/38 branch June 12, 2026 09:55
@kirill-scherba kirill-scherba mentioned this pull request Jun 12, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Submit sqlh to awesome-go list

1 participant