This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from natebird/2.0.0-beta2
Most of changes below are to make things consistent with the Vapor MySQL counterpart and to help support features in the PostgreSQL Driver. Changes: Rename connection parameter from host to hostname. This allows for supporting master and read replica in PostgreSQL Driver. Rename connected boolean to isConnected. Rename connection pointer to cConnection. Rename error var to lastError. Move all connection tests into the ConnectionTests file. New: Add Error class for better error messaging. Add Context class with isPostgreSQL var.
- Loading branch information
Showing
10 changed files
with
686 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Node | ||
|
||
public final class PostgreSQLContext: Context { | ||
internal static let shared = PostgreSQLContext() | ||
fileprivate init() {} | ||
} | ||
|
||
extension Context { | ||
public var isPostgreSQL: Bool { | ||
guard let _ = self as? PostgreSQLContext else { return false } | ||
return true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.