{"id":18655472,"url":"https://github.com/go-rel/postgres","last_synced_at":"2025-10-06T17:50:03.921Z","repository":{"id":38317746,"uuid":"409995761","full_name":"go-rel/postgres","owner":"go-rel","description":"PostgreSQL adapter for REL written in Golang.","archived":false,"fork":false,"pushed_at":"2024-12-23T04:44:06.000Z","size":157,"stargazers_count":0,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T08:21:25.040Z","etag":null,"topics":["database","golang","hacktoberfest","orm","postgres","postgresql"],"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/go-rel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"Fs02"}},"created_at":"2021-09-24T14:33:55.000Z","updated_at":"2024-12-19T01:37:14.000Z","dependencies_parsed_at":"2024-01-08T09:04:51.019Z","dependency_job_id":"4a2c62c7-5e68-4ac1-8b44-3d61fd35b655","html_url":"https://github.com/go-rel/postgres","commit_stats":{"total_commits":92,"total_committers":6,"mean_commits":"15.333333333333334","dds":"0.32608695652173914","last_synced_commit":"bb319bf9d8a828b9fdb04b79f8661bf89e82ef56"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Fpostgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Fpostgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Fpostgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/go-rel%2Fpostgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/go-rel","download_url":"https://codeload.github.com/go-rel/postgres/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248449855,"owners_count":21105577,"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","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","golang","hacktoberfest","orm","postgres","postgresql"],"created_at":"2024-11-07T07:19:04.178Z","updated_at":"2025-10-06T17:49:58.884Z","avatar_url":"https://github.com/go-rel.png","language":"Go","funding_links":["https://github.com/sponsors/Fs02"],"categories":[],"sub_categories":[],"readme":"# postgres\n\n[![GoDoc](https://godoc.org/github.com/go-rel/postgres?status.svg)](https://pkg.go.dev/github.com/go-rel/postgres)\n[![Tesst](https://github.com/go-rel/postgres/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/go-rel/postgres/actions/workflows/test.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/go-rel/postgres)](https://goreportcard.com/report/github.com/go-rel/postgres)\n[![codecov](https://codecov.io/gh/go-rel/postgres/branch/main/graph/badge.svg?token=yxBdKVPXip)](https://codecov.io/gh/go-rel/postgres)\n[![Gitter chat](https://badges.gitter.im/go-rel/rel.png)](https://gitter.im/go-rel/rel)\n\nPostgres adapter for REL.\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t_ \"github.com/lib/pq\"\n\t\"github.com/go-rel/postgres\"\n\t\"github.com/go-rel/rel\"\n)\n\nfunc main() {\n\t// open postgres connection.\n\tadapter, err := postgres.Open(\"postgres://postgres@localhost/rel_test?sslmode=disable\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tdefer adapter.Close()\n\n\t// initialize REL's repo.\n\trepo := rel.New(adapter)\n\trepo.Ping(context.TODO())\n}\n```\n\n## Example Replication (Master/Standby)\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\n\t\"github.com/go-rel/primaryreplica\"\n\t_ \"github.com/lib/pq\"\n\t\"github.com/go-rel/postgres\"\n\t\"github.com/go-rel/rel\"\n)\n\nfunc main() {\n\t// open postgres connections.\n\tadapter := primaryreplica.New(\n\t\tpostgres.MustOpen(\"postgres://postgres@master/rel_test?sslmode=disable\"),\n\t\tpostgres.MustOpen(\"postgres://postgres@standby/rel_test?sslmode=disable\"),\n\t)\n\tdefer adapter.Close()\n\n\t// initialize REL's repo.\n\trepo := rel.New(adapter)\n\trepo.Ping(context.TODO())\n}\n```\n\n## Supported Driver\n\n- github.com/lib/pq\n- github.com/jackc/pgx/v5/stdlib\n\n## Supported Database\n\n- PostgreSQL 11, 12, 13, 14, 15 and 16\n\n## Testing\n\n### Start PostgreSQL server in Docker\n\n```console\ndocker run -it --rm -p 25432:5432 -e \"POSTGRES_USER=rel\" -e \"POSTGRES_PASSWORD=rel\" -e \"POSTGRES_DB=rel_test\" postgres:14-alpine\n```\n\n### Run tests\n\n```console\ngo test -p 1 ./...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-rel%2Fpostgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgo-rel%2Fpostgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgo-rel%2Fpostgres/lists"}