René's URL Explorer Experiment


Title: Refactor go codegen to plugin types by stephen · Pull Request #1460 · sqlc-dev/sqlc · GitHub

Open Graph Title: Refactor go codegen to plugin types by stephen · Pull Request #1460 · sqlc-dev/sqlc

X Title: Refactor go codegen to plugin types by stephen · Pull Request #1460 · sqlc-dev/sqlc

Description: See #288, #923, #1416 . (hi @kyleconroy!) I got excited about the plugin api and wanted to try a few things out with the golang code generation... There are a couple questionable things in here that I wasn't sure about - will add some comments about them. If you think this work is worth continuing with, I'd be happy to try to clean it up and put it in an upstreamable state. The tests currently pass.

Open Graph Description: See #288, #923, #1416 . (hi @kyleconroy!) I got excited about the plugin api and wanted to try a few things out with the golang code generation... There are a couple questionable things in here tha...

X Description: See #288, #923, #1416 . (hi @kyleconroy!) I got excited about the plugin api and wanted to try a few things out with the golang code generation... There are a couple questionable things in here tha...

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

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:19fed75f-1ca9-3dc3-ea36-b981c9c4a97b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE196:CE438:B45D5F:F1FC96:6B01D24F
html-safe-nonce004963b597b1bd9050109fea55e926d3a28b5cdb815e5f6c0f3b859b84316d21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTk2OkNFNDM4OkI0NUQ1RjpGMUZDOTY6NkIwMUQyNEYiLCJ2aXNpdG9yX2lkIjoiODU4MjM3Mjg5MTU1MzgxMzA3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaceeb85d1d93f337417fb36e73bbd90d1c002b9845f1bf957ac4bafb15d37a1c8a
hovercard-subject-tagpull_request:867410076
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/1460/files
twitter:imagehttps://avatars.githubusercontent.com/u/2320890?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/2320890?s=400&v=4
og:image:altSee #288, #923, #1416 . (hi @kyleconroy!) I got excited about the plugin api and wanted to try a few things out with the golang code generation... There are a couple questionable things in here tha...
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/1460/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F1460%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%2F1460%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/1460/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/1460/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/1460/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
kyleconroyhttps://github.com/kyleconroy
sqlc-dev:mainhttps://github.com/sqlc-dev/sqlc/tree/main
stephen:mainhttps://github.com/stephen/sqlc/tree/main
Conversation 37 https://github.com/sqlc-dev/sqlc/pull/1460
Commits 7 https://github.com/sqlc-dev/sqlc/pull/1460/commits
Checks 0 https://github.com/sqlc-dev/sqlc/pull/1460/checks
Files changed https://github.com/sqlc-dev/sqlc/pull/1460/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
Refactor go codegen to plugin types https://github.com/sqlc-dev/sqlc/pull/1460/files#top
Show all changes 7 commits https://github.com/sqlc-dev/sqlc/pull/1460/files
d3de3a8 move a lot of stuff stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/d3de3a8c3c3c828623d4e24131ff874b84558e89
9367b82 more stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/9367b8242cf980e63ca6e650b632be12f24ea7d8
286eb40 last bit stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/286eb40bc115a518e55332ef6f00fda18d5acfcd
433c059 oops stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/433c059a9bbd2ed3e0527ce6b665af870040bede
03dcc21 convert to spaces, fix up insert_into_table stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/03dcc2191260907f6b34d00da8972020ecc63dc5
0e89ceb remove use of core.FQN from sameTableName stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/0e89cebf37565d4bfa9fb9138636401ad7684e2c
32f4c96 remove notes to self stephen Mar 1, 2022 https://github.com/sqlc-dev/sqlc/pull/1460/commits/32f4c968857273582f71d01b72fdf85589548f1d
Clear filters https://github.com/sqlc-dev/sqlc/pull/1460/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
generate.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-2ccbd26a302b29c524a67aa623a57582264d19b24a40646065be500f2e15bbd3
shim.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
compat.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-767f605de481c89037ee55af2cfc30b725c0676a512b9ae26ae7d6d432269400
driver.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-062d4df32d2a5089ab0b4d60d6d55836e22284fa72cfbc2fb51e23893d498e8e
field.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
gen.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
go_type.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-9febf00618188ee666b7f8cc8382cd90e83a745379afbf307f106cdc6da10d9e
imports.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-5888848f9ffbddb7b5d76142e6226de61375df0b151360152edae46b25965fde
mysql_type.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-a1593bf794aed4104a95547a8af6859ed68425b67ebbd3a1c65190a90a4a2d66
postgresql_type.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-0f092fe64405c1184e1bc4a30d6ffb1d5dbd2397fe90fd70590c12f15512808c
query.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-0882adeeefd3539f903f1ec19fe956505df3f46aed6221453d055b82c771a46a
result.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-554ace7a315b3c4704a348e208df36f1f4cffbd0ba9dfd51048f11fbffe8c138
sqlite_type.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-d65dfa5861653eff3117c1d8687c5b91e384bcde3ce16080e7e1453dfc09d197
struct.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-73d191f77e550f86ed1fb7f8d2122d1917f498f5bed6951d9d853246d4b7c3d2
codegen.pb.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-989ed321aa608b36a4c349345f3f959eae2b51c37d1f20099f1a0b6222dba995
ast.pb.go https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-bb8dc372545f5d34af16cc9d6bda195a3fb9f79bce06e2e5c6ea6cb8ae53276c
codegen.proto https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-7bd827b9e5f70a79f2e832b726d22c7fd81735b254e86fa0e43147b46ae7b0c3
internal/cmd/generate.gohttps://github.com/sqlc-dev/sqlc/pull/1460/files#diff-2ccbd26a302b29c524a67aa623a57582264d19b24a40646065be500f2e15bbd3
View file https://github.com/stephen/sqlc/blob/32f4c968857273582f71d01b72fdf85589548f1d/internal/cmd/generate.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1460/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-2ccbd26a302b29c524a67aa623a57582264d19b24a40646065be500f2e15bbd3
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-2ccbd26a302b29c524a67aa623a57582264d19b24a40646065be500f2e15bbd3
internal/cmd/shim.gohttps://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
View file https://github.com/stephen/sqlc/blob/32f4c968857273582f71d01b72fdf85589548f1d/internal/cmd/shim.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1460/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
stephenhttps://github.com/stephen
Mar 1, 2022https://github.com/sqlc-dev/sqlc/pull/1460/files#r816419727
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
oneofhttps://developers.google.com/protocol-buffers/docs/proto3#oneof
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
kyleconroyhttps://github.com/kyleconroy
Mar 1, 2022https://github.com/sqlc-dev/sqlc/pull/1460/files#r816952645
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Python AST protohttps://github.com/kyleconroy/sqlc/blob/main/protos/python/ast.proto#L7
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
stephenhttps://github.com/stephen
Mar 1, 2022https://github.com/sqlc-dev/sqlc/pull/1460/files#r816981659
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
kyleconroyhttps://github.com/kyleconroy
Mar 2, 2022https://github.com/sqlc-dev/sqlc/pull/1460/files#r817308904
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-1fe57c4219899679429d16ce3afd38f0e5519b1df6e6004594a68496498de77e
internal/codegen/golang/compat.gohttps://github.com/sqlc-dev/sqlc/pull/1460/files#diff-767f605de481c89037ee55af2cfc30b725c0676a512b9ae26ae7d6d432269400
View file https://github.com/stephen/sqlc/blob/32f4c968857273582f71d01b72fdf85589548f1d/internal/codegen/golang/compat.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1460/{{ revealButtonHref }}
internal/codegen/golang/driver.gohttps://github.com/sqlc-dev/sqlc/pull/1460/files#diff-062d4df32d2a5089ab0b4d60d6d55836e22284fa72cfbc2fb51e23893d498e8e
View file https://github.com/stephen/sqlc/blob/32f4c968857273582f71d01b72fdf85589548f1d/internal/codegen/golang/driver.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1460/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-062d4df32d2a5089ab0b4d60d6d55836e22284fa72cfbc2fb51e23893d498e8e
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-062d4df32d2a5089ab0b4d60d6d55836e22284fa72cfbc2fb51e23893d498e8e
internal/codegen/golang/field.gohttps://github.com/sqlc-dev/sqlc/pull/1460/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
View file https://github.com/stephen/sqlc/blob/32f4c968857273582f71d01b72fdf85589548f1d/internal/codegen/golang/field.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1460/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-54f4a6c7f5b7bb232f06a9dac29cfbf22cbfe60c5b300fee166771cbf1773fbb
internal/codegen/golang/gen.gohttps://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
View file https://github.com/stephen/sqlc/blob/32f4c968857273582f71d01b72fdf85589548f1d/internal/codegen/golang/gen.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/1460/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
https://github.com/sqlc-dev/sqlc/pull/1460/files#diff-c04dab838c419b0703213fce993d48f3d4f5fd6a659bb993d5528dd763b36198
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/1460/files
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.