Skip to content

style: SQL operator spacing, package godoc, deprecation markers, safety docs#27

Merged
kolkov merged 1 commit into
mainfrom
fix/quality-polish
Jul 3, 2026
Merged

style: SQL operator spacing, package godoc, deprecation markers, safety docs#27
kolkov merged 1 commit into
mainfrom
fix/quality-polish

Conversation

@kolkov

@kolkov kolkov commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

P4 quality polish — 5 items from enterprise audit.

Changes

  • SQL operator spacing"col"=?"col" = ? across CompareExp, HashExp, InExp for readable SQL output
  • Package godoc — Updated to recommended API (db.Select(), relica.Eq(), db.Model()) instead of deprecated db.Builder().Select("*")
  • NewDB deprecated — Standard // Deprecated: Use Open instead. format (picked up by gopls)
  • CaseWhen safety — WARNING in godoc about raw SQL condition strings
  • scanner nil checkOne(&nilPtr) now returns "dest is a nil pointer, pass a non-nil *User" instead of "got pointer to invalid"

Test plan

  • All test expectations updated for spaced operators
  • All 1600+ tests pass
  • golangci-lint run ./... = 0 issues

…n markers, safety docs

Quality polish (P4):

- CompareExp/HashExp/InExp: add spaces around operators for readable SQL
  output ("col" = ? instead of "col"=?)
- Package godoc: updated to recommended API (db.Select, relica.Eq,
  db.Model) instead of deprecated db.Builder().Select("*")
- NewDB: deprecated marker in standard gopls format
- CaseWhen: WARNING in godoc about raw SQL condition strings
- scanner: explicit nil pointer check with clear error message
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/core/scanner.go 0.00% 1 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@kolkov kolkov merged commit 7b5b114 into main Jul 3, 2026
9 checks passed
@kolkov kolkov deleted the fix/quality-polish branch July 3, 2026 15:52
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.

1 participant