Instance Method
decode(_:context:file:line:)
Decode the cell into a Swift type that conforms to
PostgresDecodable.func decode<T, JSONDecoder>(_: T.Type, context: PostgresDecodingContext<JSONDecoder>, file: String = #fileID, line: Int = #line) throws -> T where T : PostgresDecodable, JSONDecoder : PostgresJSONDecoder
Parameters
_The Swift type, which conforms to
PostgresDecodable, to decode from the cell’sbytesvalue.contextA
PostgresDecodingContextto supply a customPostgresJSONDecoderfor decoding JSON fields.fileThe source file in which this method was called. Used in the error case in
PostgresDecodingError.lineThe source file line in which this method was called. Used in the error case in
PostgresDecodingError.
Return Value
A decoded Swift type.