René's URL Explorer Experiment


Title: feat: Add embedded structs based on result match by kylecarbs · Pull Request #984 · sqlc-dev/sqlc · GitHub

Open Graph Title: feat: Add embedded structs based on result match by kylecarbs · Pull Request #984 · sqlc-dev/sqlc

X Title: feat: Add embedded structs based on result match by kylecarbs · Pull Request #984 · sqlc-dev/sqlc

Description: Identifies every column with a returned struct for queries. This is a breaking change. I'm very open to comments, ideas, or reasons why this shouldn't even happen. To prevent breakage we could move this under a configuration option, and eventually migrate to default in a major version. -- schema.sql CREATE TABLE users (id text, email text); CREATE TABLE usernames (user_id text, name text); -- query.sql -- name: GetUsers :many SELECT * FROM users; -- name: GetUsersWithUsername :many SELECT users.*, usernames.name FROM users JOIN usernames ON users.id = usernames.user_id; Before: type GetUsersWithUsernameRow struct { ID sql.NullString `db:"id"` Email sql.NullString `db:"email"` Name sql.NullString `db:"name"` } After: type GetUsersWithUsernameRow struct { User Name sql.NullString `db:"name"` }

Open Graph Description: Identifies every column with a returned struct for queries. This is a breaking change. I'm very open to comments, ideas, or reasons why this shouldn't even happen. To prevent breakage we co...

X Description: Identifies every column with a returned struct for queries. This is a breaking change. I'm very open to comments, ideas, or reasons why this shouldn't even happen. To prevent breaka...

Opengraph URL: https://github.com/sqlc-dev/sqlc/pull/984

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9c43bbb1-1130-0394-c411-9c718e088c9e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBC20:27E5CD:23A11F9:2D95DFA:6B0175EF
html-safe-nonce68271d75af55bd3de5bf8a2cc7dfdf16ef6bd350319e8997e0d301eb5ed02219
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzIwOjI3RTVDRDoyM0ExMUY5OjJEOTVERkE6NkIwMTc1RUYiLCJ2aXNpdG9yX2lkIjoiNDg4Njk2MjQ1Mjg4NzA3NDI4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3c3be03c9193cc8976c16cb128c7fe84439ff21945de2066ea875cc68e394bdd
hovercard-subject-tagpull_request:622931201
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/sqlc-dev/sqlc/pull/984/files
twitter:imagehttps://avatars.githubusercontent.com/u/7122116?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/7122116?s=400&v=4
og:image:altIdentifies every column with a returned struct for queries. This is a breaking change. I'm very open to comments, ideas, or reasons why this shouldn't even happen. To prevent breakage we co...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git
octolytics-dimension-user_id136738596
octolytics-dimension-user_loginsqlc-dev
octolytics-dimension-repository_id193160679
octolytics-dimension-repository_nwosqlc-dev/sqlc
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id193160679
octolytics-dimension-repository_network_root_nwosqlc-dev/sqlc
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sqlc-dev/sqlc/pull/984/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F984%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F984%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=sqlc-dev%2Fsqlc
Reloadhttps://github.com/sqlc-dev/sqlc/pull/984/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/984/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/984/files
sqlc-devhttps://github.com/sqlc-dev
sqlchttps://github.com/sqlc-dev/sqlc
Codehttps://github.com/sqlc-dev/sqlc
Issues600 (600)https://github.com/sqlc-dev/sqlc/issues
Pull requests132 (132)https://github.com/sqlc-dev/sqlc/pulls
Discussionshttps://github.com/sqlc-dev/sqlc/discussions
Actionshttps://github.com/sqlc-dev/sqlc/actions
Projectshttps://github.com/sqlc-dev/sqlc/projects
Security and qualityhttps://github.com/sqlc-dev/sqlc/security
Insightshttps://github.com/sqlc-dev/sqlc/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
kylecarbshttps://github.com/kylecarbs
sqlc-dev:mainhttps://github.com/sqlc-dev/sqlc/tree/main
kylecarbs:embeddedhttps://github.com/kylecarbs/sqlc/tree/embedded
Conversation 11 https://github.com/sqlc-dev/sqlc/pull/984
Commits 8 https://github.com/sqlc-dev/sqlc/pull/984/commits
Checks 0 https://github.com/sqlc-dev/sqlc/pull/984/checks
Files changed https://github.com/sqlc-dev/sqlc/pull/984/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/984/files
feat: Add embedded structs based on result match https://github.com/sqlc-dev/sqlc/pull/984/files#top
Show all changes 8 commits https://github.com/sqlc-dev/sqlc/pull/984/files
7c4be53 feat: Add identified embeddable structs kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/7c4be53b0731c70d4cc8b97e2c092e126bcc5c70
4045387 Embedded structs now fully work kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/404538788147313d9271dfcc2e6b2f03c3b2f42a
a37d35a Fix embedding of multiple structs kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/a37d35a85c2467686d6bed7cda686dad3d44fe84
76b5622 Fix duplicate identifier incrementing kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/76b5622c2175755989d7e447284ad22a02a344af
28cc3bc Fix single columns marshal kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/28cc3bcb907cf9d37b0aae86e6e74678a9db1749
52f4996 Directly access embedded struct when referenced kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/52f49961e87bdda5e7c9c2ff2e72dfdbe02c0060
31f95b0 Fix length access when too many fields kylecarbs Apr 26, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/31f95b0cae10ec6501a280f196a350176688d3d8
949e5be Merge branch 'main' into embedded kylecarbs May 5, 2021 https://github.com/sqlc-dev/sqlc/pull/984/commits/949e5be1d450e7f62072733052cd7a3755d97230
Clear filters https://github.com/sqlc-dev/sqlc/pull/984/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/984/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/984/files
field.go https://github.com/sqlc-dev/sqlc/pull/984/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
gen.go https://github.com/sqlc-dev/sqlc/pull/984/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
query.go https://github.com/sqlc-dev/sqlc/pull/984/files#diff-0882adeeefd3539f903f1ec19fe956505df3f46aed6221453d055b82c771a46a
result.go https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
struct.go https://github.com/sqlc-dev/sqlc/pull/984/files#diff-73d191f77e550f86ed1fb7f8d2122d1917f498f5bed6951d9d853246d4b7c3d2
internal/codegen/golang/field.gohttps://github.com/sqlc-dev/sqlc/pull/984/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
View file https://github.com/kylecarbs/sqlc/blob/949e5be1d450e7f62072733052cd7a3755d97230/internal/codegen/golang/field.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/984/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
internal/codegen/golang/gen.gohttps://github.com/sqlc-dev/sqlc/pull/984/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
View file https://github.com/kylecarbs/sqlc/blob/949e5be1d450e7f62072733052cd7a3755d97230/internal/codegen/golang/gen.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/984/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
internal/codegen/golang/query.gohttps://github.com/sqlc-dev/sqlc/pull/984/files#diff-0882adeeefd3539f903f1ec19fe956505df3f46aed6221453d055b82c771a46a
View file https://github.com/kylecarbs/sqlc/blob/949e5be1d450e7f62072733052cd7a3755d97230/internal/codegen/golang/query.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/984/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-0882adeeefd3539f903f1ec19fe956505df3f46aed6221453d055b82c771a46a
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-0882adeeefd3539f903f1ec19fe956505df3f46aed6221453d055b82c771a46a
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-0882adeeefd3539f903f1ec19fe956505df3f46aed6221453d055b82c771a46a
internal/codegen/golang/result.gohttps://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
View file https://github.com/kylecarbs/sqlc/blob/949e5be1d450e7f62072733052cd7a3755d97230/internal/codegen/golang/result.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/984/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
internal/codegen/golang/struct.gohttps://github.com/sqlc-dev/sqlc/pull/984/files#diff-73d191f77e550f86ed1fb7f8d2122d1917f498f5bed6951d9d853246d4b7c3d2
View file https://github.com/kylecarbs/sqlc/blob/949e5be1d450e7f62072733052cd7a3755d97230/internal/codegen/golang/struct.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/984/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-73d191f77e550f86ed1fb7f8d2122d1917f498f5bed6951d9d853246d4b7c3d2
https://github.com/sqlc-dev/sqlc/pull/984/files#diff-73d191f77e550f86ed1fb7f8d2122d1917f498f5bed6951d9d853246d4b7c3d2
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.