From b906bc76e1a9b7f261124ee662100f884445d2ec Mon Sep 17 00:00:00 2001 From: Nate Bird Date: Wed, 25 Apr 2018 16:58:55 -0400 Subject: [PATCH] Add the required imports for the sample user model Going through this the first time I got tripped up because I forgot the imports at the top. I think adding it to the docs will help other first time users avoid the same mistake I made. --- 3.0/docs/postgresql/fluent.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/3.0/docs/postgresql/fluent.md b/3.0/docs/postgresql/fluent.md index 96778bd8..d2510bc6 100644 --- a/3.0/docs/postgresql/fluent.md +++ b/3.0/docs/postgresql/fluent.md @@ -44,6 +44,9 @@ vapor xcode Now let's create our first `PostgreSQLModel`. Models represent tables in your PostgreSQL database and they are the primary method of interacting with your data. ```swift +import FluentPostgreSQL +import Vapor + /// A simple user. final class User: PostgreSQLModel { /// The unique identifier for this user. @@ -166,4 +169,4 @@ router.get("psql-version") { req -> Future in In the above example, `withPooledConnection(to:)` is used to create a connection to the database identified by `.psql`. This is the default database identifier. See [Fluent → Database](../fluent/database.md#identifier) to learn more. -Once we have the `PostgreSQLConnection`, we can perform a query on it. You can learn more about the methods available in [PostgreSQL → Core](core.md). \ No newline at end of file +Once we have the `PostgreSQLConnection`, we can perform a query on it. You can learn more about the methods available in [PostgreSQL → Core](core.md).