Skip to content

A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

License

Notifications You must be signed in to change notification settings

RockfordWei/Perfect-PostgreSQL

 
 

Repository files navigation

Perfect - PostgreSQL Connector

Get Involed with Perfect!

Star Perfect On Github Stack Overflow Follow Perfect on Twitter Join the Perfect Slack

Swift 4.0 Platforms OS X | Linux License Apache PerfectlySoft Twitter Slack Status

This project provides a Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

This package builds with Swift Package Manager and is part of the Perfect project. It was written to be stand-alone and so does not require PerfectLib or any other components.

Ensure you have installed and activated the latest Swift 4.0 tool chain.

macOS Build Notes

This package requires the Home Brew build of PostgreSQL.

To install Home Brew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

To install postgres:

brew install postgres

Linux Build Notes

Ensure that you have installed libpq-dev.

sudo apt-get install libpq-dev

Building

Add this project as a dependency in your Package.swift file.

.Package(url: "https://github.com/PerfectlySoft/Perfect-PostgreSQL.git", majorVersion: 3)

Documentation

For more information, please visit perfect.org.

Update for Swift 5.4 + Perfect Classic

// swift-tools-version: 5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "DemoApp",
    dependencies: [
        .package(url: "https://github.com/RockfordWei/Perfect.git", from: "5.6.13"),
        .package(url: "https://github.com/RockfordWei/Perfect-PostgreSQL.git", from: "5.6.0"),
    ],
    targets: [
        .executableTarget(
            name: "DemoApp",
            dependencies: [
                .product(name: "PerfectLib", package: "Perfect"),
                .product(name: "PerfectPostgreSQL", package: "Perfect-PostgreSQL")
            ]),
    ]
)

About

A stand-alone Swift wrapper around the libpq client library, enabling access to PostgreSQL servers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 99.7%
  • Other 0.3%