{"id":45703321,"url":"https://github.com/frederikhs/sql2csv","last_synced_at":"2026-02-24T23:14:51.746Z","repository":{"id":84733130,"uuid":"606538406","full_name":"frederikhs/sql2csv","owner":"frederikhs","description":"Go library for generating csv files based on SQL queries","archived":false,"fork":false,"pushed_at":"2023-03-01T14:49:30.000Z","size":29,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T13:31:17.931Z","etag":null,"topics":["csv","go","sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frederikhs.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,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-25T19:44:34.000Z","updated_at":"2023-02-25T20:16:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"4263b036-8b91-44b0-b005-21b078f2823e","html_url":"https://github.com/frederikhs/sql2csv","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/frederikhs/sql2csv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frederikhs%2Fsql2csv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frederikhs%2Fsql2csv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frederikhs%2Fsql2csv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frederikhs%2Fsql2csv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frederikhs","download_url":"https://codeload.github.com/frederikhs/sql2csv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frederikhs%2Fsql2csv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29804523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T22:43:48.403Z","status":"ssl_error","status_checked_at":"2026-02-24T22:43:18.536Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["csv","go","sql"],"created_at":"2026-02-24T23:14:51.010Z","updated_at":"2026-02-24T23:14:51.741Z","avatar_url":"https://github.com/frederikhs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sql2csv\n\n[![GoDoc](https://godoc.org/github.com/frederikhs/sql2csv?status.svg)](https://godoc.org/github.com/frederikhs/sql2csv)\n[![Quality](https://goreportcard.com/badge/github.com/frederikhs/sql2csv)](https://goreportcard.com/report/github.com/frederikhs/sql2csv)\n[![Test](https://github.com/frederikhs/sql2csv/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/frederikhs/sql2csv/actions/workflows/test.yml)\n[![Release](https://img.shields.io/github/v/release/frederikhs/sql2csv.svg)](https://github.com/frederikhs/sql2csv/releases/latest)\n[![License](https://img.shields.io/github/license/frederikhs/sql2csv)](LICENSE)\n\n*Go library for generating csv files based on SQL queries*\n\nOnly supporting PostgreSQL\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"github.com/frederikhs/sql2csv\"\n)\n\nconst (\n\thost     = \"db.example.com\"\n\tport     = \"5432\"\n\tuser     = \"example\"\n\tpassword = \"example\"\n\tdbname   = \"example\"\n)\n\nfunc main() {\n\tconn, err := sql2csv.NewConnection(context.Background(), user, password, host, port, dbname)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer conn.Close(context.Background())\n\n\tquery, err := sql2csv.NewQuery(context.Background(), \"SELECT * FROM public.users LIMIT $1\", 10)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// writes results to ./results.csv\n\terr = conn.WriteQuery(query, \"results.csv\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrederikhs%2Fsql2csv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrederikhs%2Fsql2csv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrederikhs%2Fsql2csv/lists"}