Skip to content

Commit

Permalink
Updated README to fix inconsistencies. Fixes #99 (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
dingwilson authored and quanvo87 committed Aug 21, 2017
1 parent c31d99d commit edd76ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ let grades = Grades()
Next we create a pool of connections to PostgreSQL:

```swift
let pool = PostgreSQLConnection.createPool(host: "localhost", port: 5432, options: [.userName("username"), .password("password")], poolOptions: ConnectionPoolOptions(initialCapacity: 10, maxCapacity: 50, timeout: 10000)))
let pool = PostgreSQLConnection.createPool(host: "localhost", port: 5432, options: [.userName("username"), .password("password")], poolOptions: ConnectionPoolOptions(initialCapacity: 10, maxCapacity: 50, timeout: 10000))
```

Every time we need a connection, we get it from the pool:
Expand Down Expand Up @@ -103,7 +103,7 @@ guard let connection = pool.getConnection() else {
// Error
}

connection.execute(query: query) { result: QueryResult in
connection.execute(query: query) { queryResult in
if let resultSet = queryResult.asResultSet {
for title in resultSet.titles {
// The column names of the result.
Expand Down Expand Up @@ -330,7 +330,7 @@ s.execute(connection) { queryResult in
}
}
}
else if let queryError = result.asError {
else if let queryError = queryResult.asError {
...
}
}
Expand Down

0 comments on commit edd76ce

Please sign in to comment.