From edd76ce3b1dfa2dc4e3ef175e7a0131eef0bf15a Mon Sep 17 00:00:00 2001 From: Wilson Ding Date: Mon, 21 Aug 2017 12:33:17 -0500 Subject: [PATCH] Updated README to fix inconsistencies. Fixes #99 (#101) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 122a284e..6b0d54b9 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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. @@ -330,7 +330,7 @@ s.execute(connection) { queryResult in } } } - else if let queryError = result.asError { + else if let queryError = queryResult.asError { ... } }