Basil Bourque
Basil Bourque

Reputation: 340230

Connect to Postgres from Swift

In a Swift app, how does one connect to a Postgres database server?

How to do the equivalent from Swift?

Upvotes: 6

Views: 9331

Answers (2)

Ilya Biltuev
Ilya Biltuev

Reputation: 460

You can try to use PostgresClientKit

Upvotes: 1

Buğra Ekuklu
Buğra Ekuklu

Reputation: 3278

You may use Postgres C API libpq. However, at least a thin layer of Swift will be needed to make it object-oriented and ARC compliant. An example implementation of that layer may be like so: stepanhruda/PostgreSQL-Swift.

Upvotes: 6

Related Questions