{"id":24908523,"url":"https://github.com/gosuit/pg","last_synced_at":"2025-08-25T15:17:53.837Z","repository":{"id":274942419,"uuid":"924556915","full_name":"gosuit/pg","owner":"gosuit","description":"PostgreSQL client","archived":false,"fork":false,"pushed_at":"2025-08-20T12:57:31.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T13:27:38.502Z","etag":null,"topics":["golang","pgx","postgres"],"latest_commit_sha":null,"homepage":"","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/gosuit.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":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-30T08:28:26.000Z","updated_at":"2025-03-30T09:49:38.000Z","dependencies_parsed_at":"2025-08-20T13:26:04.331Z","dependency_job_id":null,"html_url":"https://github.com/gosuit/pg","commit_stats":null,"previous_names":["gosuit/pg"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/gosuit/pg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuit%2Fpg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuit%2Fpg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuit%2Fpg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuit%2Fpg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gosuit","download_url":"https://codeload.github.com/gosuit/pg/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gosuit%2Fpg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272085244,"owners_count":24870675,"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-25T02:00:12.092Z","response_time":1107,"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","pgx","postgres"],"created_at":"2025-02-02T02:20:09.419Z","updated_at":"2025-08-25T15:17:53.791Z","avatar_url":"https://github.com/gosuit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PG\n\npg is a wrapper around the \u003ca href=\"https://github.com/jackc/pgx\"\u003epgx\u003c/a\u003e library for PostgreSQL in Go. It simplifies the process of connecting to a PostgreSQL database, managing migrations, and other. This library provides a clean interface for database operations while leveraging the performance and features of pgx.\n\n## Installation\n\n```zsh\ngo get github.com/gosuit/pg\n```\n\n## Features\n\n• Connection Management: Easily establish connections to PostgreSQL databases using configurable parameters.\n\n• Migration Support: Automatically run database migrations using the goose migration tool.\n\n• Other: Register custom PostgreSQL types with your database connection.\n\n• Mocking: You can create mock client with mock pgx pool\n\n## Usage\n\n```golang\npackage main\n\nimport (\n    \"context\"\n    \"log\"\n\n    \"github.com/gosuit/pg\"\n)\n\nfunc main() {\n    ctx := context.Background()\n\n    cfg := \u0026pg.Config{\n        Host:           \"localhost\",\n        Port:           5432,\n        DBName:         \"your_database\",\n        Username:       \"your_username\",\n        Password:       \"your_password\",\n        SSLMode:        \"disable\",\n        MigrationsRun:  true,\n        MigrationsPath: \"./migrations\",\n    }\n\n    client, err := pg.New(ctx, cfg)\n    if err != nil {\n        log.Fatalf(\"failed to create client: %v\", err)\n    }\n\n    err = client.RegisterTypes([]string{\"custom_type\"})\n    if err != nil {\n        log.Fatalf(\"failed to register types: %v\", err)\n    }\n\n    // Use client for database operations...\n\n    // Access underlying pgxpool\n    pool := client.ToPgx()\n    // Use pool...\n}\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosuit%2Fpg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgosuit%2Fpg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgosuit%2Fpg/lists"}