{"id":19258797,"url":"https://github.com/outdooractive/postgresconnectionpool","last_synced_at":"2026-02-08T11:33:39.976Z","repository":{"id":63919626,"uuid":"528897743","full_name":"Outdooractive/PostgresConnectionPool","owner":"Outdooractive","description":"A simple connection pool on top of PostgresNIO written in Swift.","archived":false,"fork":false,"pushed_at":"2024-11-21T12:15:35.000Z","size":76,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T23:35:27.879Z","etag":null,"topics":["pool","postgres-kit","postgres-nio","postgresql","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/Outdooractive.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-25T14:55:01.000Z","updated_at":"2024-11-21T12:15:27.000Z","dependencies_parsed_at":"2024-05-29T11:08:06.186Z","dependency_job_id":"ab341bd9-1393-49d5-945a-fb1d4c7ac9f5","html_url":"https://github.com/Outdooractive/PostgresConnectionPool","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.08333333333333337,"last_synced_commit":"5ae338c61c86e8a7edcbfa522828d79fa3d77e64"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Outdooractive%2FPostgresConnectionPool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Outdooractive%2FPostgresConnectionPool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Outdooractive%2FPostgresConnectionPool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Outdooractive%2FPostgresConnectionPool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Outdooractive","download_url":"https://codeload.github.com/Outdooractive/PostgresConnectionPool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250090609,"owners_count":21373216,"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":["pool","postgres-kit","postgres-nio","postgresql","swift"],"created_at":"2024-11-09T19:14:23.854Z","updated_at":"2026-02-08T11:33:39.931Z","avatar_url":"https://github.com/Outdooractive.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgresConnectionPool\n\nA simple connection pool on top of [PostgresNIO](https://github.com/vapor/postgres-nio) and [PostgresKit](https://github.com/vapor/postgres-kit).\n\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOutdooractive%2FPostgresConnectionPool%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/Outdooractive/PostgresConnectionPool)\n[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FOutdooractive%2FPostgresConnectionPool%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/Outdooractive/PostgresConnectionPool)\n\n## Requirements\n\nThis package requires Swift 5.7 or higher (at least Xcode 13), and compiles on macOS (\\\u003e= macOS 10.15) and Linux.\n\n## Installation with Swift Package Manager\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/Outdooractive/PostgresConnectionPool.git\", from: \"0.7.0\"),\n],\ntargets: [\n    .target(name: \"MyTarget\", dependencies: [\n        .product(name: \"PostgresConnectionPool\", package: \"PostgresConnectionPool\"),\n    ]),\n]\n```\n\n## Usage\n\nPlease see also the [API documentation](https://swiftpackageindex.com/Outdooractive/PostgresConnectionPool/main/documentation/postgresconnectionpool).\n\n``` swift\nimport PostgresConnectionPool\nimport PostgresKit\nimport PostgresNIO\n\nvar logger = Logger(label: \"TestApp\")\nlogger.logLevel = .debug\n\nlet postgresConfiguration = PostgresConnection.Configuration(\n    host: \"postgres\",\n    port: 5432,\n    username: \"testuser\",\n    password: \"testpassword\",\n    database: \"test\",\n    tls: .disable)\nlet configuration = PoolConfiguration(\n    applicationName: \"TestApp\",\n    postgresConfiguration: postgresConfiguration,\n    connectTimeout: 10.0,\n    queryTimeout: 60.0,\n    poolSize: 5,\n    maxIdleConnections: 1)\nlet pool = PostgresConnectionPool(configuration: configuration, logger: logger)\n\n// Fetch a connection from the pool and do something with it...\ntry await pool.connection { connection in\n    try await connection.query(PostgresQuery(stringLiteral: \"SELECT 1\"), logger: logger)\n}\n\n// With PostgresKit\nfunc fetchObjects\u003cT: Decodable\u003e(_ sql: SQLQueryString) async throws -\u003e [T] {\n    try await pool.connection({ connection in\n        return try await connection.sql().raw(sql).all(decoding: T.self)\n    })\n}\n\n// Open connections, current SQL queries, etc.\nawait print(pool.info())\n\n// Always call `shutdown()` before releasing a pool\nawait pool.shutdown()\n```\n\n## Contributing\n\nPlease create an issue or open a pull request with a fix or enhancement.\n\n## License\n\nMIT\n\n## Author\n\nThomas Rasch, Outdooractive\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutdooractive%2Fpostgresconnectionpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foutdooractive%2Fpostgresconnectionpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foutdooractive%2Fpostgresconnectionpool/lists"}