Skip to content

Commit

Permalink
conform PostgresData to PostgresDataConvertible (#51)
Browse files Browse the repository at this point in the history
* work in progress

* return fatal error on static postgres data type
  • Loading branch information
JaapWijnen authored and tanner0101 committed Oct 15, 2019
1 parent ec382c1 commit 185d009
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Sources/PostgresNIO/Data/PostgresData.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,17 @@ public struct PostgresData: CustomStringConvertible, CustomDebugStringConvertibl
return self.description
}
}

extension PostgresData: PostgresDataConvertible {
public static var postgresDataType: PostgresDataType {
fatalError("PostgresData cannot be statically represented as a single data type")
}

public init?(postgresData: PostgresData) {
self = postgresData
}

public var postgresData: PostgresData? {
return self
}
}

0 comments on commit 185d009

Please sign in to comment.