Skip to content

feat(first): Add new command 'first' for optional returns#4286

Draft
jaglyserx wants to merge 2 commits intosqlc-dev:mainfrom
jaglyserx:feat/optional-return-first
Draft

feat(first): Add new command 'first' for optional returns#4286
jaglyserx wants to merge 2 commits intosqlc-dev:mainfrom
jaglyserx:feat/optional-return-first

Conversation

@jaglyserx
Copy link

@jaglyserx jaglyserx commented Feb 4, 2026

This PR adds a new command, which I call 'first'; this seems semantically in line with most SQL libraries I've used in the past. The command handles the ErrNoRows error natively and instead returns a pointer to the queried-for struct.

TODO: add test coverage

@jaglyserx jaglyserx changed the title feat/optional return first feat(first): Add new command 'first' for optional returns Feb 4, 2026
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