Skip to content

Commit 42f48db

Browse files
committed
feat(poet): add VarDecl and convert query functions to structured statements
Add VarDecl statement type to poet package for variable declarations inside function bodies (e.g., "var items []Type"). Convert all standard SQL driver query functions to use structured poet statements instead of strings.Builder: - addQueryOneStd: uses Assign, VarDecl, If, Return - addQueryManyStd: uses Assign, VarDecl, Defer, For, If, Return - addQueryExecRowsStd: uses Assign, If, Return - addQueryExecLastIDStd: uses Assign, If, Return - addQueryExecResultStd: uses Assign, If, Return Slice queries (sqlc.slice) fall back to RawStmt due to their complex dynamic SQL generation requirements. Added wrapErrorReturn helper for consistent error wrapping logic. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 8926302 commit 42f48db

File tree

3 files changed

+407
-105
lines changed

3 files changed

+407
-105
lines changed

0 commit comments

Comments
 (0)