See vapor-community/postgresql for libpq based version.
libpq
🐘 Non-blocking, event-driven Swift client for PostgreSQL.