Skip to content

Commit 98eae63

Browse files
authored
Merge pull request #151 from Maxim-Inv/master
Fix: error when content in column is float/double #150
2 parents 3f1a1a1 + 57dcef0 commit 98eae63

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/MySQL/Protocol/MySQLBinaryResultsetRow.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ struct MySQLBinaryResultsetRow {
107107
default: throw MySQLError(identifier: "timeLength", reason: "Invalid MYSQL_TIME length.", source: .capture())
108108
}
109109
storage = .time(time)
110+
case .MYSQL_TYPE_FLOAT:
111+
storage = try .float4(bytes.requireFloatingPoint(as: Float.self, source: .capture()))
112+
case .MYSQL_TYPE_DOUBLE:
113+
storage = try .float8(bytes.requireFloatingPoint(as: Double.self, source: .capture()))
110114
default: throw MySQLError(identifier: "binaryColumn", reason: "Unsupported type: \(column)", source: .capture())
111115
}
112116
}

0 commit comments

Comments
 (0)