mcorega / MySqlSwiftNative

MySQL Swift Native Driver
Other
112 stars 44 forks source link

Problem querying rows with NULL fields #8

Closed riccardo-tesio closed 7 years ago

riccardo-tesio commented 8 years ago

When a cell contains NULL, then all the remaining cells in the row are returned with NULL values.

Fix: in Utils.swift, func lenEncStr(b:[UInt8]) ->(String?, Int), around line 213: guard num != nil else { return (nil, 0) } should be changed with:

        `guard num != nil else {
            return (nil, n)
        }`
sahandnayebaziz commented 7 years ago

@riccardo-tesio can you open a PR with this fix?