PostgresClientKit

PostgresClientKit provides a friendly Swift API for operating against a PostgreSQL database.

Features

Doesn’t require libpq. PostgresClientKit implements the Postgres network protocol in Swift, so it does not require libpq.

Developer-friendly API using modern Swift. For example, errors are represented by instances of enum PostgresError: Error and are raised by a throw or by returning a Result<Success, Error>.

Safe conversion between Postgres and Swift types. Type conversion is explicit and robust. Conversion errors are signaled, not masked. PostgresClientKit provides additional Swift types for dates and times to address the impedance mismatch between Postgres types and Foundation Date.

Memory efficient. The rows in a result are exposed through an iterator, not an array. Rows are lazily retrieved from the Postgres server.

SSL/TLS support. Encrypts the connection between PostgresClientKit and the Postgres server.

Pull requests against the develop branch are welcomed. For a non-trivial contribution (for example, more than correcting spelling, typos, or whitespace) please first discuss the proposed change by opening an issue.

License

PostgresClientKit is licensed under the Apache 2.0 license. See LICENSE for details.