     }
 
     private func convertValue(value: UnsafeMutablePointer<Int8>, columnIndex: Int32) -> Any? {
-        let oid = PQftype(self.res!, Int32(columnIndex))
+        let oid = PQftype(self.result!, Int32(columnIndex))
 
         guard let stringValue = String(validatingUTF8: value),
             let type = RopeValueType(rawValue: Int(oid))

    }

    private func columnAt(rowIndex: Int32, columnIndex: Int32) -> Any? {
        guard PQgetisnull(self.res, rowIndex, columnIndex) == 0 else {
            return nil
        }

        guard let value = PQgetvalue(self.res, rowIndex, columnIndex) else {
            return nil
        }



public final class RopeResult {

    private(set) var result: OpaquePointer? = OpaquePointer(bitPattern: 0)

    public var rowsCount: Int {
        return Int(PQntuples(self.result))
    }

    public var columnsCount: Int {
        return Int(PQnfields(self.result))
    }

    init(_ res: OpaquePointer?) {
        self.result = res
    }

    deinit {
