René's URL Explorer Experiment


Title: Ability to return an iterator on a "many" query · Issue #720 · sqlc-dev/sqlc · GitHub

Open Graph Title: Ability to return an iterator on a "many" query · Issue #720 · sqlc-dev/sqlc

X Title: Ability to return an iterator on a "many" query · Issue #720 · sqlc-dev/sqlc

Description: Hi, when a query return a myriad of objects, the slice based solution is not very efficient, it would be great if it was possible to have a way to return some kind of iterator on the rows, something like sql.Rows but type safe. The first...

Open Graph Description: Hi, when a query return a myriad of objects, the slice based solution is not very efficient, it would be great if it was possible to have a way to return some kind of iterator on the rows, somethin...

X Description: Hi, when a query return a myriad of objects, the slice based solution is not very efficient, it would be great if it was possible to have a way to return some kind of iterator on the rows, somethin...

Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/720

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ability to return an iterator on a \"many\" query","articleBody":"Hi, when a query return a myriad of objects, the slice based solution is not very efficient, it would be great if it was possible to have a way to return some kind of iterator on the rows, something like sql.Rows but type safe.\r\n\r\nThe first solution that comes to mind is to add a new type of function in the sql queries builder.\r\nInstead of writing `-- name: Name :many` we would write `-- name: Name :rows` or another relevant keyword\r\n\r\nand for the generated code, it would look something like this\r\n```sql\r\nCREATE TABLE pilots (\r\n          id integer NOT NULL,\r\n          name text NOT NULL\r\n);\r\n\r\nALTER TABLE pilots ADD CONSTRAINT pilot_pkey PRIMARY KEY (id);\r\n```\r\n```sql\r\n-- name: ListPilots :rows\r\nSELECT * FROM pilots;\r\n```\r\n```go\r\ntype Pilot struct {\r\n\tID   int32\r\n\tName string\r\n}\r\n\r\ntype PilotRows struct {\r\n\trows *sql.Rows\r\n}\r\n\r\nfunc (p *PilotRows) Close() error {\r\n\treturn p.rows.Close()\r\n}\r\nfunc (p *PilotRows) Next() bool {\r\n\treturn p.rows.Next()\r\n}\r\nfunc (p *PilotRows) Scan(dest *Pilot) error {\r\n\treturn p.rows.Scan(dest.ID, dest.Name)\r\n}\r\nfunc (p *PilotRows) Err() error {\r\n\treturn p.rows.Err()\r\n}\r\n\r\nfunc (q *Queries) ListPilots(ctx context.Context) (*PilotRows, error) {\r\n\trows, err := q.query(ctx, q.listPilotsStmtn, listPilots)\r\n\tif err != nil {\r\n\t\treturn nil, err\r\n\t}\r\n\treturn \u0026PilotRows{rows: rows}, nil\r\n}\r\n\r\n```\r\n","author":{"url":"https://github.com/encendre","@type":"Person","name":"encendre"},"datePublished":"2020-09-27T04:11:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":22},"url":"https://github.com/720/sqlc/issues/720"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6b83eeb6-54f0-86a1-2a0f-c289d56612c3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB46C:185C34:6BE284:91C779:6A530281
html-safe-nonce862fabb86bb22f4a00c75be83047e2c907423923815659cf9a0d6904d5e28537
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDZDOjE4NUMzNDo2QkUyODQ6OTFDNzc5OjZBNTMwMjgxIiwidmlzaXRvcl9pZCI6IjgwMDk0NjQ2NTI3MTgzNDI3ODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbfbf5199cc9de67fb40f59c28c2f9eef87863edf3d32e61bea4aca339068ee97
hovercard-subject-tagissue:709662625
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/720/issue_layout
twitter:imagehttps://opengraph.githubassets.com/93236ebab8754040c6715991db19e4b54c735086288d3871dd8db1f696afb18f/sqlc-dev/sqlc/issues/720
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/93236ebab8754040c6715991db19e4b54c735086288d3871dd8db1f696afb18f/sqlc-dev/sqlc/issues/720
og:image:altHi, when a query return a myriad of objects, the slice based solution is not very efficient, it would be great if it was possible to have a way to return some kind of iterator on the rows, somethin...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameencendre
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sqlc-dev/sqlc/issues/720#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fissues%2F720
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fissues%2F720
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sqlc-dev%2Fsqlc
Reloadhttps://github.com/sqlc-dev/sqlc/issues/720
Reloadhttps://github.com/sqlc-dev/sqlc/issues/720
Reloadhttps://github.com/sqlc-dev/sqlc/issues/720
Please reload this pagehttps://github.com/sqlc-dev/sqlc/issues/720
sqlc-dev https://github.com/sqlc-dev
sqlchttps://github.com/sqlc-dev/sqlc
Notifications https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Fork 1.1k https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Star 18k https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Code https://github.com/sqlc-dev/sqlc
Issues 597 https://github.com/sqlc-dev/sqlc/issues
Pull requests 106 https://github.com/sqlc-dev/sqlc/pulls
Discussions https://github.com/sqlc-dev/sqlc/discussions
Actions https://github.com/sqlc-dev/sqlc/actions
Projects https://github.com/sqlc-dev/sqlc/projects
Security and quality 0 https://github.com/sqlc-dev/sqlc/security
Insights https://github.com/sqlc-dev/sqlc/pulse
Code https://github.com/sqlc-dev/sqlc
Issues https://github.com/sqlc-dev/sqlc/issues
Pull requests https://github.com/sqlc-dev/sqlc/pulls
Discussions https://github.com/sqlc-dev/sqlc/discussions
Actions https://github.com/sqlc-dev/sqlc/actions
Projects https://github.com/sqlc-dev/sqlc/projects
Security and quality https://github.com/sqlc-dev/sqlc/security
Insights https://github.com/sqlc-dev/sqlc/pulse
Ability to return an iterator on a "many" queryhttps://github.com/sqlc-dev/sqlc/issues/720#top
enhancementNew feature or requesthttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/encendre
encendrehttps://github.com/encendre
on Sep 27, 2020https://github.com/sqlc-dev/sqlc/issues/720#issue-709662625
enhancementNew feature or requesthttps://github.com/sqlc-dev/sqlc/issues?q=state%3Aopen%20label%3A%22enhancement%22
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.