Skip to content

Commit

Permalink
fix: Make database init public
Browse files Browse the repository at this point in the history
  • Loading branch information
EnriqueL8 committed Feb 23, 2018
1 parent 482f7f6 commit 4217104
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/SwiftKueryORM/Database.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Database {
private let connectionStrategy: ConnectionStrategy

/// Constructor for a single connection which becomes a connection pool
convenience init(single connection: Connection) {
public convenience init(single connection: Connection) {
// Create single entry connection pool for thread safety
let singleConnectionPool = ConnectionPool(options: ConnectionPoolOptions(initialCapacity: 1, maxCapacity: 1),
connectionGenerator: { connection },
Expand All @@ -43,12 +43,12 @@ public class Database {
}

/// Default constructor for a connection pool
init(_ pool: ConnectionPool) {
public init(_ pool: ConnectionPool) {
self.connectionStrategy = .pool(pool)
}

/// Constructor for a custom generator
init(generator: @escaping () -> Connection?) {
public init(generator: @escaping () -> Connection?) {
self.connectionStrategy = .generator(generator)
}

Expand Down

0 comments on commit 4217104

Please sign in to comment.