Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of unresolved identifier 'PostgresDatabaseConfiguration' #39

Closed
nightslide opened this issue Apr 17, 2018 · 2 comments
Closed

Use of unresolved identifier 'PostgresDatabaseConfiguration' #39

nightslide opened this issue Apr 17, 2018 · 2 comments

Comments

@nightslide
Copy link

I just tried to implement the example given in Readme.md, and faced such a problem at the very beginning.

let db = Database(configuration: try PostgresDatabaseConfiguration(database: postgresTestDBName, host: "localhost"))

  • I have PostgreSQL installed on my Mac

  • I have PerfectCRUD dependency in my Package.swift

Should I implement 'PostgresDatabaseConfiguration' by myself?

@kjessup
Copy link
Member

kjessup commented Apr 17, 2018

No, you should just need to import PerfectPostgreSQL.
You can see it in action in the tests (it's typealiased, but you get the picture):

https://github.com/PerfectlySoft/Perfect-PostgreSQL/blob/master/Tests/PerfectPostgreSQLTests/PerfectPostgreSQLTests.swift#L30

@nightslide
Copy link
Author

Solved. I tried to add PerfectPostgreSQL dependency like this
.package(url: "https://github.com/PerfectlySoft/Perfect-PostgreSQL.git", .upToNextMinor(from: "3.0.0"))
So I received PerfectPostgreSQL 3.0.6 instead of 3.1.1.
Thanks a lot ^^

@kjessup kjessup closed this as completed Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants