{"id":39893563,"url":"https://github.com/optiopay/sqlgen","last_synced_at":"2026-01-18T15:03:29.078Z","repository":{"id":57515459,"uuid":"71324837","full_name":"optiopay/sqlgen","owner":"optiopay","description":"A sql.Scanner and sql.Valuer generator for Go","archived":false,"fork":false,"pushed_at":"2016-10-24T21:58:16.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-12-17T14:51:04.907Z","etag":null,"topics":["library","open-source","sql"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/optiopay.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-19T06:13:47.000Z","updated_at":"2017-04-11T15:11:22.000Z","dependencies_parsed_at":"2022-08-30T04:20:10.150Z","dependency_job_id":null,"html_url":"https://github.com/optiopay/sqlgen","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/optiopay/sqlgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optiopay%2Fsqlgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optiopay%2Fsqlgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optiopay%2Fsqlgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optiopay%2Fsqlgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/optiopay","download_url":"https://codeload.github.com/optiopay/sqlgen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/optiopay%2Fsqlgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28538883,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["library","open-source","sql"],"created_at":"2026-01-18T15:03:28.281Z","updated_at":"2026-01-18T15:03:29.071Z","avatar_url":"https://github.com/optiopay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sqlgen\n\nThis tool generates `sql.Scanner` and `sql.Valuer` interfaces for your own structs and type aliases. It is tested with Postgres and `lib/pq` library, others might work. The command is quite self explanatory, use the `--help` option to understand the parameters.\n\n## Trying it out\n\nThe `example` folder provides you with tests and structs to understand how this tool works. Run `go generate` in the example folder to generate the interfaces. Then you can run `go test` to see if all works. It tries to connect to a local postgres instance and needs a database named ﻿⁠⁠⁠⁠`custom`.\n\nThe ﻿`-array`﻿⁠⁠⁠⁠ param generates array types as well, the ﻿`-sql`﻿⁠⁠⁠⁠ param adds a Init\u003cstruct\u003e function that can be used to create the composite type in postgres.\n\n## Aliases\nThere is support for type aliases. To generate scanner and valuer for type aliases you can pass them through the `alias` param. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptiopay%2Fsqlgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foptiopay%2Fsqlgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foptiopay%2Fsqlgen/lists"}