raku-community-modules / DBIish

Database interface for Raku
89 stars 31 forks source link

Eliminate error when integer field was null #224

Closed massa closed 2 years ago

massa commented 2 years ago

In practical use with mariadb 10.1, sometimes the field of type integer came to the converter function as null (Str) and the expression

$type($datum)

where $type === Int and $datum === Str raised an exception. This fixes the problem.

rbt commented 2 years ago

Is there an SQL statement that demonstrates this problem?

Is is a 10.1 bug only (10.2 and later have the fix?). If so, please add a comment stating why the try is required.

massa commented 2 years ago

I will close this, because... I can't reproduce the bug that made me do this for starters... I apologize for any time loss...