{"id":9824901,"url":"https://github.com/Paulo-Lopes-Estevao/sqlc-generate-crud","last_synced_at":"2025-08-28T14:31:49.412Z","repository":{"id":165926607,"uuid":"640409664","full_name":"Paulo-Lopes-Estevao/sqlc-generate-crud","owner":"Paulo-Lopes-Estevao","description":"library that generates CRUD sql operations for a struct using the sqlc structure.","archived":false,"fork":false,"pushed_at":"2023-05-20T05:30:22.000Z","size":25,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-09T21:39:58.598Z","etag":null,"topics":["golang","migration","sql","sqlc"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/Paulo-Lopes-Estevao/sqlc-generate-crud","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/Paulo-Lopes-Estevao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md ","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-14T01:49:38.000Z","updated_at":"2024-07-15T12:36:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b3a52bd-a818-4ed0-9c33-7b93344349b9","html_url":"https://github.com/Paulo-Lopes-Estevao/sqlc-generate-crud","commit_stats":null,"previous_names":["paulo-lopes-estevao/sqlc-generate-sql-crud"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Paulo-Lopes-Estevao/sqlc-generate-crud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fsqlc-generate-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fsqlc-generate-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fsqlc-generate-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fsqlc-generate-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Paulo-Lopes-Estevao","download_url":"https://codeload.github.com/Paulo-Lopes-Estevao/sqlc-generate-crud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Paulo-Lopes-Estevao%2Fsqlc-generate-crud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272509018,"owners_count":24946651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-28T02:00:10.768Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["golang","migration","sql","sqlc"],"created_at":"2024-05-18T01:04:35.640Z","updated_at":"2025-08-28T14:31:49.137Z","avatar_url":"https://github.com/Paulo-Lopes-Estevao.png","language":"Go","funding_links":["https://ko-fi.com/E1E2L169R","https://www.buymeacoffee.com/pl1745240p"],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# sqlc generate crud\n\nis a library that generates CRUD sql operations for a struct using the sqlc structure.\n\n## Case of use\n\nwas created in order to decrease the time spent writing queries using the sqlc: A SQL Compiler.\n[sqlc](https://sqlc.dev/)\n\n\n## Installation\n\n```bash\ngo get github.com/Paulo-Lopes-Estevao/sqlc-generate-crud\n```\n\n## Usage\n\n### Required create a file sqlc.yaml\n\n```yaml\nversion: \"2\"\nsql:\n  - schema: \"postgresql/schema.sql\"\n    queries: \"postgresql\"\n    engine: \"postgresql\"\n    gen:\n      go:\n        package: \"authors\"\n        out: \"postgresql\"\n```\n\n\u003e generated sql files will be saved in the queries path folder in the sqlc.yaml file\n\nfunction Generate has 2 parameters:\n\n- **data** : struct that will be used to generate the CRUD operations\n- **options** : struct that will be used to configure the generation _tag_ and _pathTarget_\n\n```golang\n// GenerateConfig is a struct that will be used to configure the generation\ntype GenerateConfig struct {\n    Tag        string\n    PathTarget string\n}\n```\n\n### Example\n\n```golang\npackage main\n\nimport (\n    \"github.com/Paulo-Lopes-Estevao/sqlc-generate-crud\"\n)\n\ntype User struct {\n    ID int64 `json:\"id\"`\n    Name string `json:\"name\"`\n    Email string `json:\"email\"`\n}\n\nfunc main() {\n\terr := sqlcgeneratecrud.Generate(User{}, \u0026sqlcgeneratecrud.GenerateConfig{})\n\tif err != nil {\n        panic(err)\n    }\n}\n```\n\n\n\n## Contributing\n\nBefore opening an issue or pull request, please check the project's contribution documents.\n\nPlease read [CONTRIBUTING.md](CONTRIBUTING.md) for details about our code of conduct, and the process for submitting pull requests.\n\n## Support Donate\n\nIf you find this project useful, you can buy author a glass of juice 🧃\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E2L169R)\n\nalso a coffee ☕️\n\n\u003ca href=\"https://www.buymeacoffee.com/pl1745240p\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\nwill be very grateful to you for your support 😊.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulo-Lopes-Estevao%2Fsqlc-generate-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPaulo-Lopes-Estevao%2Fsqlc-generate-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPaulo-Lopes-Estevao%2Fsqlc-generate-crud/lists"}