Title: Allow errors returned by queries to be wrapped with method name information · Issue #1612 · sqlc-dev/sqlc · GitHub
Open Graph Title: Allow errors returned by queries to be wrapped with method name information · Issue #1612 · sqlc-dev/sqlc
X Title: Allow errors returned by queries to be wrapped with method name information · Issue #1612 · sqlc-dev/sqlc
Description: What do you want to change? Free unicorns! And... Currently, when I use a bunch of query methods (like q.SelectUnicorns()) and then just do the usual if err!=nil { return err }, then I'll have a hard time figuring out which of those caus...
Open Graph Description: What do you want to change? Free unicorns! And... Currently, when I use a bunch of query methods (like q.SelectUnicorns()) and then just do the usual if err!=nil { return err }, then I'll have a ha...
X Description: What do you want to change? Free unicorns! And... Currently, when I use a bunch of query methods (like q.SelectUnicorns()) and then just do the usual if err!=nil { return err }, then I'll have ...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/1612
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow errors returned by queries to be wrapped with method name information","articleBody":"### What do you want to change?\r\n\r\nFree unicorns! And...\r\n\r\nCurrently, when I use a bunch of query methods (like `q.SelectUnicorns()`) and then just do the usual `if err!=nil { return err }`, then I'll have a hard time figuring out which of those caused the SQL error.\r\n\r\nTherefore, I typically do\r\n```go\r\nerr := q.SelectUnicorns()`\r\nif err!= nil {\r\n return fmt.Errorf(\"SelectUnicorns %w\", err)\r\n}\r\n```\r\n\r\nIt would be nice if there was a feature toggle to enable this wrapping right within the generated code.\r\n\r\n### What database engines need to be changed?\r\n\r\n_No response_\r\n\r\n### What programming language backends need to be changed?\r\n\r\nGo","author":{"url":"https://github.com/Hades32","@type":"Person","name":"Hades32"},"datePublished":"2022-05-11T16:15:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1612/sqlc/issues/1612"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:23596fcc-ef88-2c75-8c4b-c20dd856246f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B658:BFAF3:5552E3:732480:6A51CCE8 |
| html-safe-nonce | 8074c8528fe3e314eb58aa8adf074e6a518276c16a1fa6d0312612e7668316c8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjU4OkJGQUYzOjU1NTJFMzo3MzI0ODA6NkE1MUNDRTgiLCJ2aXNpdG9yX2lkIjoiMTA3NDQ0NjU3ODM3NzQxMTgxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 03f940146eeecd35ced32fe9bc01b8429eb8d698b1a7934b300d53565f7af09b |
| hovercard-subject-tag | issue:1232892576 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/1612/issue_layout |
| twitter:image | https://opengraph.githubassets.com/14b913ff56e5e13e93fe0f40eca03b231749d2182d10682ed0bd85d67ce4b7b2/sqlc-dev/sqlc/issues/1612 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/14b913ff56e5e13e93fe0f40eca03b231749d2182d10682ed0bd85d67ce4b7b2/sqlc-dev/sqlc/issues/1612 |
| og:image:alt | What do you want to change? Free unicorns! And... Currently, when I use a bunch of query methods (like q.SelectUnicorns()) and then just do the usual if err!=nil { return err }, then I'll have a ha... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Hades32 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width