{"id":48528926,"url":"https://github.com/tinywasm/postgres","last_synced_at":"2026-04-07T23:30:43.757Z","repository":{"id":168455359,"uuid":"644150634","full_name":"tinywasm/postgres","owner":"tinywasm","description":"PostgreSQL adapter for tinywasm/orm — pure Go, no CGO, supports WASM-compatible builds","archived":false,"fork":false,"pushed_at":"2026-04-01T00:15:20.000Z","size":168,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-01T02:42:49.178Z","etag":null,"topics":["database","golang","orm","postgres-adapter","postgresql","tinywasm","wasm"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tinywasm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["cdvelop"]}},"created_at":"2023-05-22T23:40:51.000Z","updated_at":"2026-04-01T00:15:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"a9d49097-9afb-49e0-bc59-c3c56c248f46","html_url":"https://github.com/tinywasm/postgres","commit_stats":null,"previous_names":["cdvelop/postgre","cesarsoliscaro/postgre"],"tags_count":143,"template":false,"template_full_name":null,"purl":"pkg:github/tinywasm/postgres","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fpostgres","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fpostgres/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fpostgres/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fpostgres/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinywasm","download_url":"https://codeload.github.com/tinywasm/postgres/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinywasm%2Fpostgres/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31533823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T16:28:08.000Z","status":"ssl_error","status_checked_at":"2026-04-07T16:28:06.951Z","response_time":105,"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":["database","golang","orm","postgres-adapter","postgresql","tinywasm","wasm"],"created_at":"2026-04-07T23:30:42.083Z","updated_at":"2026-04-07T23:30:43.749Z","avatar_url":"https://github.com/tinywasm.png","language":"Go","funding_links":["https://github.com/sponsors/cdvelop"],"categories":[],"sub_categories":[],"readme":"# PostgreSQL Adapter for tinywasm/orm\n\u003cimg src=\"docs/img/badges.svg\"\u003e\n\nThis repository implements the `orm.Adapter` interface for PostgreSQL, allowing it to be used with the `github.com/tinywasm/orm` library.\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"github.com/tinywasm/postgres\"\n\t\"github.com/tinywasm/orm\"\n)\n\nfunc main() {\n\tdsn := \"postgres://user:password@localhost:5432/dbname?sslmode=disable\"\n\tdb, err := postgre.New(dsn)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Use db...\n}\n```\n\n## Features\n\n- Full `orm.Adapter` implementation.\n- Transaction support via `BeginTx`.\n- Secure SQL generation with parameterized queries using `$1`, `$2`, etc.\n- Support for `Create`, `ReadOne`, `ReadAll`, `Update`, `Delete`.\n- Efficient row scanning.\n\n## Update\n\n`db.Update` always requires at least one `Condition`. This is enforced at\ncompile time by `tinywasm/orm`. There is no \"update by PK implicitly\" magic.\n\n```go\n// ✅ Correct\nif err := db.Update(\u0026user, orm.Eq(User_.ID, user.ID)); err != nil { ... }\n\n// ❌ Compile error (caught by tinywasm/orm — will not reach the PostgreSQL layer)\ndb.Update(\u0026user)\n```\n\n## Documentation\n\n- [Postgres Setup \u0026 Troubleshooting](docs/POSTGRES_SETUP.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywasm%2Fpostgres","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinywasm%2Fpostgres","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinywasm%2Fpostgres/lists"}