{"id":20051770,"url":"https://github.com/golangtoolkits/go-postgres","last_synced_at":"2026-05-07T10:36:23.532Z","repository":{"id":163723281,"uuid":"639182419","full_name":"GolangToolKits/go-postgres","owner":"GolangToolKits","description":"A simple mockable postgres db interface","archived":false,"fork":false,"pushed_at":"2023-05-11T23:43:00.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-11T06:35:30.983Z","etag":null,"topics":["database","go","golang","postgres","postgresql","postgresql-database"],"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/GolangToolKits.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}},"created_at":"2023-05-11T00:05:50.000Z","updated_at":"2023-05-11T23:46:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"3a6423e5-6de4-47ec-a349-f16b0ea5f23f","html_url":"https://github.com/GolangToolKits/go-postgres","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/GolangToolKits/go-postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolangToolKits%2Fgo-postgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolangToolKits%2Fgo-postgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolangToolKits%2Fgo-postgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolangToolKits%2Fgo-postgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GolangToolKits","download_url":"https://codeload.github.com/GolangToolKits/go-postgres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GolangToolKits%2Fgo-postgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32733939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["database","go","golang","postgres","postgresql","postgresql-database"],"created_at":"2024-11-13T12:05:49.063Z","updated_at":"2026-05-07T10:36:23.517Z","avatar_url":"https://github.com/GolangToolKits.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-postgres\nA simple mockable postgres db interface\n\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/GolangToolKits/go-postgres)](https://goreportcard.com/report/github.com/GolangToolKits/go-postgres)\n\n```go\n\n    mm := \u0026PgDB{\n\t    Host:     \"localhost\",\n        Port:     \"5432\",\n\t    User:     \"test\",\n\t    Password: \"test\",\n\t    Database: \"test\",\t\t\t\t\n    }\n    m := mm.New()\n    m.Connect()\n    //Insert requires  RETURNING id on end of prepared statement query\n        //Example: \"insert into carrier (carrier, type, store_id) values($1, $2, $3) RETURNING id\"\n    m.Insert(query, args...)\n    m.Update(query, args...)\n    m.Get(query, args...)\n    m.GetList(query, args...)\n    m.Delete(query, args...)\n\n```\n\n## Also Supports Transactions\n\n```go\n mm := \u0026PgDB{\n\t    Host:     \"localhost\",\n        Port:     \"5432\",\n\t    User:     \"test\",\n\t    Password: \"test\",\n\t    Database: \"test\",\t\t\t\t\n    }\n    m := mm.New()\n    m.Connect()\n    tr := m.BeginTransaction()\n    //Insert requires  RETURNING id on end of prepared statement query\n        //Example: \"insert into carrier (carrier, type, store_id) values($1, $2, $3) RETURNING id\"\n    tr.Insert(query, args...)\n    tr.Update(query, args...)\n    tr.Get(query, args...)\n    tr.GetList(query, args...)\n    tr.Delete(query, args...)\n    tr.Commit()\n    //Or\n    tr.Rollback()\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolangtoolkits%2Fgo-postgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolangtoolkits%2Fgo-postgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolangtoolkits%2Fgo-postgres/lists"}