{"id":30185202,"url":"https://github.com/saihex/querywife","last_synced_at":"2026-06-19T08:32:27.780Z","repository":{"id":309520799,"uuid":"1036588821","full_name":"Saihex/QueryWife","owner":"Saihex","description":"A lightweight, Deno-powered database proxy that pools PostgreSQL connections for your microservices. Your reliable, no-nonsense middlewoman handling queries with loyalty and finesse. Perfect for scalable edge deployments and keeping your database happy.","archived":false,"fork":false,"pushed_at":"2025-08-20T04:26:00.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-20T06:21:39.517Z","etag":null,"topics":["database","postgresql","saihexware"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Saihex.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-08-12T09:45:40.000Z","updated_at":"2025-08-20T04:26:04.000Z","dependencies_parsed_at":"2025-08-12T13:31:02.995Z","dependency_job_id":null,"html_url":"https://github.com/Saihex/QueryWife","commit_stats":null,"previous_names":["saihex/querywife"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Saihex/QueryWife","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saihex%2FQueryWife","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saihex%2FQueryWife/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saihex%2FQueryWife/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saihex%2FQueryWife/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Saihex","download_url":"https://codeload.github.com/Saihex/QueryWife/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Saihex%2FQueryWife/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34523982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"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":["database","postgresql","saihexware"],"created_at":"2025-08-12T13:10:31.459Z","updated_at":"2026-06-19T08:32:27.774Z","avatar_url":"https://github.com/Saihex.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Notice: Saihex's public repositories are moving to Codeberg https://codeberg.org/saihex/QueryWife\n# Saihex Studios' QueryWife\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"512\" alt=\"SaihexWare Collection Logo\" src=\"https://s3.saihex.com/public/logos/saihexware.svg\"/\u003e\n\u003c/div\u003e\n\n---\n\n**QueryWife** is a lightweight Deno server application that acts as a pooled\nconnection layer between your services and your PostgreSQL database. Think of it\nas your reliable middleman (or middlewoman, if you prefer) that prevents\ndatabase overload by pooling connections efficiently—especially useful for edge\ndeployments with multiple instances.\n\nThe server listens on port `8080` and applies the same query handling logic for\nall endpoints except `/health`, which is reserved for Docker health checks. In\nproduction, QueryWife runs as a standalone binary, minimizing the risk of\nruntime code injection or hijacking.\n\nIt also features an automatic restart every 48 hours by exiting with code `1`,\nrelying on Docker’s restart policy (usually `on-failure`) to keep it fresh and\nstable.\n\n\u003e ⚠️ **Warning:** QueryWife is designed for internal use behind proper\n\u003e authentication. It will execute _any_ SQL query it receives, faithfully and\n\u003e without question—like a loyal wife following your commands. Use with caution!\n\n---\n\n### Configuration\n\nQueryWife reads configuration from the following environment variables:\n\n- `POSTGRES_HOSTNAME`\\\n  The hostname or IP address of the PostgreSQL database server.\n\n- `POSTGRES_PORT`\\\n  The port of the PostgreSQL database server.\n\n- `POSTGRES_DATABASE`\\\n  The name of the specific PostgreSQL database to connect to.\n\n- `POSTGRES_USER`\\\n  The username used to authenticate with the PostgreSQL server.\n\n- `POSTGRES_PASSWORD`\\\n  The password for the PostgreSQL user.\n\n- `POSTGRES_APPNAME`\\\n  The name that Postgres should recognize this service as.\n\n- `POOL_SIZE`\\\n  The maximum number of connections to maintain in the database connection pool.\n\n---\n\n### Health Check\n\nYou can verify that QueryWife and the database connection are healthy by making\na GET request to:\n\n```\nhttp://\u003cquerywife-host\u003e:8080/health\n```\n\nA healthy response returns:\n\n```\nI'm alright, honey!\n```\n\n---\n\n### Usage Notes\n\n- QueryWife expects requests with a JSON body containing:\n  - `query`: The SQL query string.\n  - `values`: An array of parameters to bind in the query.\n\n- All responses return JSON arrays of result rows.\n\n- Binary fields (e.g., PostgreSQL `BYTEA`) will be serialized as Base64 strings.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaihex%2Fquerywife","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaihex%2Fquerywife","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaihex%2Fquerywife/lists"}