Skip to content

Commit

Permalink
Merge pull request #308 from natebird/patch-3
Browse files Browse the repository at this point in the history
Add the required imports for the sample user model
  • Loading branch information
tanner0101 committed Apr 25, 2018
2 parents 994422d + b906bc7 commit 7b2f8ec
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion 3.0/docs/postgresql/fluent.md
Expand Up @@ -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.
Expand Down Expand Up @@ -166,4 +169,4 @@ router.get("psql-version") { req -> Future<String> 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 &rarr; 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 &rarr; Core](core.md).
Once we have the `PostgreSQLConnection`, we can perform a query on it. You can learn more about the methods available in [PostgreSQL &rarr; Core](core.md).

0 comments on commit 7b2f8ec

Please sign in to comment.