 }
 
 private struct RowSingleValueDecodingContainer: SingleValueDecodingContainer {
-    let row: Row
+    var row: Row
+    var columnIndex: Int
     var codingPath: [CodingKey]
-    let column: CodingKey
-    let columnIndex: Int
-    
+
     /// Decodes a null value.
     ///
     /// - returns: Whether the encountered value was null.


private struct RowKeyedDecodingContainer<Key: CodingKey>: KeyedDecodingContainerProtocol {
    let decoder: RowDecoder
    
    init(decoder: RowDecoder) {
        self.decoder = decoder
    }
    
    var codingPath: [CodingKey] { return decoder.codingPath }
    
    /// All the keys the `Decoder` has for this container.
    ///

        } else if let type = T.self as? DatabaseValueConvertible.Type {
            return type.decode(from: row, atUncheckedIndex: columnIndex) as! T
        } else {
            return try T(from: RowSingleValueDecoder(row: row, columnIndex: columnIndex, codingPath: codingPath))
        }
    }
}

private struct RowDecoder: Decoder {
    var row: Row
    var codingPath: [CodingKey]
    var userInfo: [CodingUserInfoKey : Any] { return [:] }
    
    func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> {
