Giter Club home page Giter Club logo

postgresql's Introduction

Swift Linux Build Status macOS Build Status codecov GitHub license

PostgreSQL for Swift

Prerequisites

The PostgreSQL C driver must be installed in order to use this package.
Follow the README of the cpostgresql repo to get started.

Using PostgreSQL

This section outlines how to import the PostgreSQL package both with or without a Vapor project.

With Vapor

The easiest way to use PostgreSQL with Vapor is to include the PostgreSQL provider.

import PackageDescription

let package = Package(
    name: "Project",
    dependencies: [
        .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 2),
        .Package(url: "https://github.com/vapor-community/postgresql-provider.git", majorVersion: 2)
    ],
    exclude: [ ... ]
)

The PostgreSQL provider package adds PostgreSQL to your project and adds some additional, Vapor-specific conveniences like drop.postgresql().

Using import PostgreSQLProvider will import both Fluent and Fluent's Vapor-specific APIs.

With Fluent

Fluent is a powerful, pure-Swift ORM that can be used with any Server-Side Swift framework. The PostgreSQL driver allows you to use a PostgreSQL database to power your models and queries.

import PackageDescription

let package = Package(
    name: "Project",
    dependencies: [
        ...
        .Package(url: "https://github.com/vapor/fluent.git", majorVersion: 2),
        .Package(url: "https://github.com/vapor-community/postgresql-driver.git", majorVersion: 2)
    ],
    exclude: [ ... ]
)

Use import PostgreSQLDriver to access the PostgreSQLDriver class which you can use to initialize a Fluent Database.

Just PostgreSQL

At the core of the PostgreSQL provider and PostgreSQL driver is a Swift wrapper around the C PostgreSQL client. This package can be used by itself to send raw, parameterized queries to your PostgreSQL database.

import PackageDescription

let package = Package(
    name: "Project",
    dependencies: [
        ...
        .Package(url: "https://github.com/vapor/postgresql.git", majorVersion: 2)
    ],
    exclude: [ ... ]
)

Use import PostgreSQL to access the PostgreSQL.Database class.

Examples

Connecting to the Database

import PostgreSQL

let postgreSQL =  PostgreSQL.Database(
    hostname: "localhost",
    database: "test",
    user: "root",
    password: ""
)

Select

let version = try postgreSQL.execute("SELECT version()")

Prepared Statement

The second parameter to execute() is an array of PostgreSQL.Values.

let results = try postgreSQL.execute("SELECT * FROM users WHERE age >= $1", [.int(21)])

Listen and Notify

try postgreSQL.listen(to: "test_channel") { notification in
    print(notification.channel)
    print(notification.payload)
}

// Allow set up time for LISTEN
sleep(1)

try postgreSQL.notify(channel: "test_channel", payload: "test_payload")

Connection

Each call to execute() creates a new connection to the PostgreSQL database. This ensures thread safety since a single connection cannot be used on more than one thread.

If you would like to re-use a connection between calls to execute, create a reusable connection and pass it as the third parameter to execute().

let connection = try postgreSQL.makeConnection()
let result = try postgreSQL.execute("SELECT * FROM users WHERE age >= $1", [.int(21)]), connection)

Contributors

Maintained by Steven Roebert, Nate Bird, Prince Ugwuh, and other members of the Vapor community.

postgresql's People

Contributors

0xtim avatar agisboye avatar barrault01 avatar codynhat avatar dmonagle avatar gperdomor avatar johnbona avatar juanjoarreola avatar ken-broadsheet avatar kzaher avatar loganwright avatar maciejtrybilo avatar natebird avatar prince2k3 avatar pruthvikar avatar sroebert avatar tanner0101 avatar vzsg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

postgresql's Issues

Does not support prefix_range type

Node(wrapped: [0, 0, 57, 57, 50, 51, 52, 12, 54, 53, 64, 49, 51, 57, 0], context: PostgreSQL.PostgreSQLContext)

This is what its providing for type prefix_range and can not be converter to any other type

Does it build with just released Swift major release?

Hello,

I tried to use the Swift3 package manager to add the dependency to vapor/postgresql tag 0.3.1 using this in Package.swift

   dependencies: [
        .Package(url: "https://github.com/vapor/vapor.git", majorVersion: 1, minor: 0),
        .Package(url: "https://github.com/vapor/postgresql.git", Version(0, 3, 1)),
    ],

I got the following output on

swift build

Cloning https://github.com/vapor/postgresql.git
HEAD is now at c21260c Merge pull request #5 from vapor/swiftenv-gm-support
Resolved version: 0.3.1
error: The dependency graph could not be satisfied (https://github.com/vapor/node.git)
➜  Smartbikers cd Packages 
➜  Packages ll
total 0
drwxr-xr-x  20 topicus  staff  680 Sep 23 15:17 .
drwxr-xr-x  18 topicus  staff  612 Sep 23 15:17 ..
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 CLibreSSL-1.0.0
drwxr-xr-x   6 topicus  staff  204 Sep 23 15:00 CPostgreSQL-0.1.1
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 Console-1.0.0
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 Core-1.0.0
drwxr-xr-x  10 topicus  staff  340 Sep 23 13:00 Crypto-1.0.0
drwxr-xr-x  15 topicus  staff  510 Sep 23 13:00 Engine-1.0.0
drwxr-xr-x  13 topicus  staff  442 Sep 23 13:00 Fluent-1.0.1
drwxr-xr-x  10 topicus  staff  340 Sep 23 13:00 JSON-1.0.0
drwxr-xr-x  12 topicus  staff  408 Sep 23 13:00 Jay-1.0.0
drwxr-xr-x  12 topicus  staff  408 Sep 23 13:01 Leaf-1.0.0
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 Node-1.0.0
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 PathIndexable-1.0.0
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 Polymorphic-1.0.0
drwxr-xr-x  14 topicus  staff  476 Sep 23 13:00 Socks-1.0.1
drwxr-xr-x  12 topicus  staff  408 Sep 23 13:00 TLS-1.0.0
drwxr-xr-x  11 topicus  staff  374 Sep 23 13:00 Turnstile-1.0.3
drwxr-xr-x  19 topicus  staff  646 Sep 23 15:08 Vapor-1.0.2
drwxr-xr-x  12 topicus  staff  408 Sep 23 15:17 postgresql.git

Any suggestions?

I suppose the package manager is still buggy. I tried a simple directory rename to include the version number but that does not help. Perhaps there is a dependency conflict between current Vapor 1.2.0 and Postgresql 0.3.1 or some issue with convention of package names?

Kind regards,

Edwin Jansen

libpq-fe.h not found

Hi
I have this error:

/Packages/CPostgreSQL-1.0.0/module.modulemap:8:12: error: header '/usr/include/postgresql/libpq-fe.h' not found

On ubuntu 16.04 I have installed:

apt-get install postgresql postgresql-client postgresql-contrib

What have I forgotten?

Incorrect result when parsing "NUMERIC" values

BinaryUtils.parseNumeric seems to return values with a completely off scale.
600 for example becomes a String Node with "0.0000000000000600" inside.

I will upload a failing test case soon.

Support for PostGIS

PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL.

I would love to see support for it in our Vapor postgresql driver.
To be able to declare those types and to run queries from Fluent

http://postgis.net

Using Listen Leads To Crashes

Libpq docs say connections should not be shared between threads.

Some example error messages:
message type 0x31 arrived from server while idle
message type 0x32 arrived from server while idle
message type 0x54 arrived from server while idle
PostgreSQL Error: Unknown

Also, the sleep(1) poll loop makes this useless for most things. It should use a select call because most of the time people are using notify for timely notification.

Compile error with swift package

I try to use this lib for first time with Swift 4:

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

import PackageDescription

let package = Package(
    name: "DbLib",
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        // .package(url: /* package url */, from: "1.0.0"),
        .package(url: "https://github.com/groue/GRDB.swift.git", from: "2.10.0"),
        .package(url: "https://github.com/vapor/postgresql.git", from: "2.1.2"),
        //.package(url: "https://github.com/IBM-Swift/Swift-Kuery-PostgreSQL.git", from: "1.2.0"),
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "DbLib",
            dependencies: ["GRDB", "PostgreSQL"]),
    ]
)

➜ swift build
warning: error while trying to use pkgConfig flags for swift-nio-zlib-support: couldNotFindConfigFile
Compile libbcrypt blf.c
Compile libbcrypt bcrypt.c
Compile CNIOAtomics src/c-atomics.c
Compile CNIOSHA1 c_nio_sha1.c
Compile CNIOLinux shim.c
Compile CNIODarwin shim.c
Compile CNIOOpenSSL empty.c
Compile Swift Module 'Debugging' (3 sources)
Compile Swift Module 'NIOPriorityQueue' (2 sources)
Compile Swift Module 'COperatingSystem' (1 sources)
Compile Swift Module 'GRDB' (92 sources)
Compile Swift Module 'NIOConcurrencyHelpers' (2 sources)
Compile Swift Module 'NIO' (52 sources)
Compile Swift Module 'NIOFoundationCompat' (1 sources)
Compile Swift Module 'Bits' (12 sources)
Compile Swift Module 'Async' (15 sources)
Compile Swift Module 'NIOTLS' (3 sources)
/Users/mamcx/Proyectos/Swift/DbLib/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Flatten.swift:50:51: error: missing argument label 'file:' in call
let promise = worker.eventLoop.newPromise([Element.Expectation].self)
^
file:
/Users/mamcx/Proyectos/Swift/DbLib/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Flatten.swift:53:48: error: ambiguous reference to member 'init'
var results: [Element.Expectation?] = .init(repeating: nil, count: count)
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mamcx/Proyectos/Swift/DbLib/.build/checkouts/core.git-9210800844849382486/Sources/Async/Future+Flatten.swift:53:48: note: overloads for 'init' exist with these partially matching parameter lists: (repeating: Element, count: Int), (repeating: Self.Element, count: Int)
var results: [Element.Expectation?] = .init(repeating: nil, count: count)
^
error: terminated(1): /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-build-tool -f /Users/mamcx/Proyectos/Swift/DbLib/.build/debug.yaml main

README.md: LAST_INSERTED_ID() function does not exist in PostgreSQL

Following does not work in Swift:

let connection = try postgreSQL.makeConnection()
let result = try postgreSQL.execute("SELECT LAST_INSERTED_ID() as id", [], connection)

Here is the error:

"DatabaseError: invalidSQL("ERROR: function last_inserted_id() does not exist\nLINE 1: SELECT LAST_INSERTED_ID() as id;\n ^\nHINT: No function matches the given name and argument types. You might need to add explicit type casts.\n")",

PostgreSQL Vapor Packages won't compile after install

I installed PostgreSQL on my Mac and installed the PostgreSQL provider to my project but after I run my project it says how libpq-fe.h isn't found and also I've noticed the whole CPostgreSQL folder is empty under Dependencies. It also saysCould not build Objective-C module CPostgreSQL I'm guessing that's because the folder is empty. I have no clue how to fix this any any help would be greatly appreciated.

Enabling SSL needs to be configurable

https://github.com/vapor/postgresql/blob/master/Sources/PostgreSQL/Connection.swift#L20

On some platforms, SSL is required, I think we need to make it a configurable option in the line above.

This will also need to apply to provider.

http://stackoverflow.com/questions/11832361/how-to-setup-spring-heroku-postgres-ssl-datasource/24716055#24716055

Might be nice to have a more flexible query config or something that can support many little options w/o explicit initializer arguments for each

Support for connection pooling

The ability to leverage a pool of PostgreSQL connections rather than creating one every time would be a huge improvement in performance and stability. As it stands now, unless I do manual checking in my code it would be trivial to exhaust the number of available connections from the server if accessing the database through REST calls, etc.

Error encoding array of enums as jsonb

I’d like to encode an array of enums, but get the following error during migration:

Fatal error: Error raised at top level: ⚠️ PostgreSQL Error: column "priviliges" is of type jsonb[] but expression is of type smallint[]
- id: PostgreSQLError.server.error.transformAssignedExpr

Any help would be appreciated, thank you.

reproduce with:

import Foundation
import Foundation
import Authentication
import FluentPostgreSQL
import Crypto
enum Privilege: UInt8, Codable {
    case createPost,
    updateOtherUserPost,
    createTopic,
    adminUsers
    
    static var allPriviliges: [Privilege] {
        get {
            return [
            .createPost,
            .updateOtherUserPost,
            .createTopic,
            .adminUsers
            ]
        }
    }
}

You’ll need a basic User with id, email, username, password, and privs: [Privilege].

struct AdminUser: Migration {
    typealias Database = PostgreSQLDatabase
    
    static func prepare(on conn: PostgreSQLConnection) -> EventLoopFuture<Void> {
        let adminUsername = Environment.get("ADMIN_USER")
        let adminEmail = Environment.get("ADMIN_EMAIL")
        let envPassword = Environment.get("ADMIN_PASSWORD")
        guard let password = envPassword, password.count > 7,
            let username = adminUsername,
            let email = adminEmail
            else {
                fatalError("Required Admin values not set in environment")
        }
        let maybeEncryptedPassword = try? BCrypt.hash(password)
        guard let encryptedPassword = maybeEncryptedPassword else {
            fatalError("Admin password could not be encrypted")
        }
        let admin = User(id: nil,
                         email: email,
                         username: username,
                         password: encryptedPassword,
                         privs: Privilege.allPriviliges)
        return admin.save(on: conn).transform(to: ())
    }
    static func revert(on conn: PostgreSQLConnection) -> EventLoopFuture<Void> {
        return .done(on: conn)
    }
}

Things attempted:
change enum type to String, Codable, Uint, Codable. Using just privs: [. adminUsers] in User().

Preparations causing fatal error

Expected Behavior

Preparations should run and vapor should report Database prepared on OSX and Linux

Current Behavior

Preparations run as expected on OSX but not on Linux.

Preparations cause fatal error: unexpectedly found nil while unwrapping an Optional value

Postgres also encounters the following ERROR: relation "fluent" does not exist at character 43
when executing this statement
STATEMENT: SELECT COUNT(*) as _fluent_aggregate FROM "fluent"

Possible causes

Seems like the way preparation history is being tracked is causing an issue when trying to store in the db. Maybe the fluent table is not being set up properly?

Steps to Reproduce

  1. When running a simple Vapor application on this docker image based on the official swift image
  2. Postgres running on this image
  3. Compile and run a vapor project with a preparation

Details

Here is the full (yet limited) stack trace. It is cause after the first preparation has finished

Current stack trace:
0    libswiftCore.so                    0x00007f3ee02066b0 swift_reportError + 120
1    libswiftCore.so                    0x00007f3ee02210d0 _swift_stdlib_reportFatalError + 62
2    libswiftCore.so                    0x00007f3ee001acb6 <unavailable> + 1186998
3    libswiftCore.so                    0x00007f3ee017a39d <unavailable> + 2626461
4    libswiftCore.so                    0x00007f3ee001acb6 <unavailable> + 1186998
5    libswiftCore.so                    0x00007f3ee0135410 specialized _fatalErrorMessage(StaticString, StaticString, file : StaticString, line : UInt, flags : UInt32) -> Never + 96
6    Server                             0x00000000007d06fc <unavailable> + 3999484
7    Server                             0x00000000007d0419 <unavailable> + 3998745
8    libpthread.so.0                    0x00007f3edf1dda99 <unavailable> + 60057
9    libswiftCore.so                    0x00007f3ee0214e90 swift_once + 90
10   Server                             0x00000000007d085a <unavailable> + 3999834
11   Server                             0x00000000007d89e0 <unavailable> + 4032992
12   Server                             0x00000000007d8d2e <unavailable> + 4033838
13   Server                             0x00000000007dad00 <unavailable> + 4041984
14   Server                             0x00000000007c74dc <unavailable> + 3962076
15   Server                             0x00000000007c760a <unavailable> + 3962378
16   Server                             0x00000000007c7709 <unavailable> + 3962633
17   libswiftCore.so                    0x00007f3edfffcd10 Collection.map<A> ((A.Iterator.Element) throws -> A1) throws -> [A1] + 762
18   Server                             0x00000000007c7397 <unavailable> + 3961751
19   Server                             0x00000000007cb471 <unavailable> + 3978353
20   Server                             0x00000000007e31e5 <unavailable> + 4076005
21   Server                             0x00000000007e2584 <unavailable> + 4072836
22   Server                             0x00000000007e3eb5 <unavailable> + 4079285
23   Server                             0x000000000074abeb <unavailable> + 3451883
24   Server                             0x000000000074779a <unavailable> + 3438490
25   Server                             0x00000000007475e5 <unavailable> + 3438053
26   Server                             0x00000000007326d9 <unavailable> + 3352281
27   Server                             0x00000000007188cc <unavailable> + 3246284
28   Server                             0x000000000071abb5 <unavailable> + 3255221
29   Server                             0x00000000007193ba <unavailable> + 3249082
30   Server                             0x00000000006dd9ed <unavailable> + 3004909
31   Server                             0x00000000007367ab <unavailable> + 3368875
32   Server                             0x0000000000735d96 <unavailable> + 3366294
33   Server                             0x0000000000795910 <unavailable> + 3758352
34   Server                             0x00000000007910fa <unavailable> + 3739898
35   Server                             0x000000000079187b <unavailable> + 3741819
36   Server                             0x000000000061ffdc <unavailable> + 2228188
37   Server                             0x000000000062501d <unavailable> + 2248733
38   Server                             0x0000000000624e0a <unavailable> + 2248202
39   Server                             0x00000000009caab6 <unavailable> + 6073014
40   Server                             0x000000000042cd50 main + 38
41   libc.so.6                          0x00007f3eddad1740 __libc_start_main + 240
42   Server                             0x000000000042cc79 <unavailable> + 183417
Illegal instruction

Bug: Use of `assert` prevents code from being executed when optimization is turned on

In utilities.swift:

  internal mutating func skip(_ n: Int) {
        guard n < count else {
            self = Data()
            return
        }
        for _ in 0..<n {
            // -> popFirst() doesn't get executed if optimization is turned on!
            assert(popFirst() != nil)
        }
    }

Possible fix:

  internal mutating func skip(_ n: Int) {
        guard n < count else {
            self = Data()
            return
        }
        for _ in 0..<n {           
            let check = popFirst()
            assert(check != nil)
        }
    }

commit 3c24375 changed test database name

3c24375 changed the test database name from "test" to "postgres". The warning message still says you need to have "test" available, not postgres.

I also think this is a negative because unit tests should be in their own database and not have a potential to conflict with relations already in the postgres database.

Memory leak in `Bind`

Memory is being allocated all across Bind class, stored to bytes and never deallocated.

Problem with bytea field

Hello

I am trying to save data (formed from an NSAttributedString) to a bytea field.

As a test i try to save a string and retrieve it.

Here is my code:

`
let s = "Une string".data(using: .utf8)!

    let bytesfroms = [UInt8](s)
      
    let da = Data.init(bytes: bytesfroms)
        
    let st = String(data: da, encoding: String.Encoding.utf8)
        
    print(st)

	Optional("Une string")



    let savedData = try! conn.execute("INSERT INTO files (filename,file) VALUES ($1,$2)",[fileName.makeNode(in: nil),bytesfroms.makeNode(in: nil)])`

Sa far as i test i can see that my string is transformet into Data and i can retrieve it before saving.

I save it in the database (the bytea field says BINARY (39 bytes).

When i tried to retrieve my string from the database i do:

`let results = try! conn.execute("SELECT filename,file FROM files ORDER BY id")

    let row = results[0]
    
 
    
    var b:[UInt8]? = row?["file"]!.bytes
          
    let da:Data = Data(bytes: b!)
    
    let st = String(data: da, encoding: String.Encoding.utf8)

    print("String: \(st)")

`
The result is:

    String: Optional("{85,110,101,32,115,116,114,105,110,103}")

I expect to see String: Optional("Une string")

What i am doing wrong with the Node ?

Optional Double field

I have optional double field in my vapor model and if I omit that field when saving model, then database driver spits out:

Uncaught Error: DatabaseError.invalidSQL("ERROR:  invalid input syntax for type double precision: \"\"\n"). Use middleware to catch this error and provide a better response. Otherwise, a 500 error page will be returned in the production environment.% 

I think the problem is in Database.swift which applies bindings:

for i in 0..<values.count {
  var ch = values[i].string?.bytes ?? []
  ch.append(0)

The value that is translated from model is Node.Node.null but then the loop itself simply pushes null terminated string back to database, but instead probably should produce NULL to indicate the intention.

The query itself is:

INSERT INTO users (phone, latitude, longitude, username) VALUES ($1, $2, $3, $4)

Running the following SQL manually works fine:

INSERT INTO users (phone, latitude, longitude, username) VALUES ('+340000000000', NULL, NULL, 'user');

Spending some time reading through docs revealed that PQexecParams converts nil pointer to NULL.

Reference: https://www.postgresql.org/docs/9.1/static/libpq-exec.html

Support SQL keyword as column names

Moved from: vapor/fluent#131

Feature, Enhancement, or Optimization

Name of Feature

Support SQL keyword as column names

Introduction

I was adding a model with a "var desc: String" field, then in the preparation step console shows error:

Failed to prepare [ModelName]
invalidSQL("ERROR: syntax error at or near "desc"\nLINE 1: ...RIMARY KEY NOT NULL, desc VARCH...\n ^\n")"

(more details in vapor-community/postgresql-provider#9)

Changing "desc" to "desca" fixes the problem, and apparently it's caused by "desc" as a reserved keyword in SQL, which could be worked around by adding [] around the column names (http://stackoverflow.com/questions/285775/how-to-deal-with-sql-column-names-that-look-like-sql-keywords).

Motivation

Since Fluent should be DB agnostic, it shouldn't limit what name Model var/column could have, so we should make it support any var name.

Proposed solution

Not sure if MySQL, Postgres & MongoDB share similar solution to special column names or not, but for Postgres for example, we probably could always add [] around the column names when making queries or commands to make sure they work - it could also be the job of each provider or driver, but probably we want to start with Fluent to at least provide comment/instruction about column names to the providers.

Impact

Shouldn't have any impact to existing code

Alternatives considered

Have better error output when a reserved keyword is used, which is not as ideal

Decision (For Moderator Use)

On [Date], the community decided to (TBD) this proposal. When the community makes a decision regarding this proposal, their rationale for the decision will be written here.

'libpq-fe.h' file not found when compiling via Xcode

I'm not sure if this belongs here or on the main Vapor project, but hopefully someone can direct me.

Problem

When including the postgresql package with vapor, the project will not compile with the generated Xcode project.

How to Reproduce

  1. Create a blank Vapor project
  2. Add the the vapor-community/postgresql package
  3. Generate an xcode project using vapor xcode
  4. Attempt to build inside of Xcode

Notes

vapor build works fine, so it seems like it's an Xcode project generation issue (missing a framework/header search path).

However, I'm only just getting into Vapor right now and I'm not sure if various packages/plugins have the ability to provide cues to project file generator or not (i.e "please add these search paths", etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.