You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
client
.query("SELECT ?fields FROM table WHERE nullable_field = ?").bind(None)
fails at runtime with:
invalid param: invalid SQL: invalid argument: serialize_none is unsupported
The pattern of having nullable binds is quite common in server-side applications so I would have expected Option<_> support in binds somewhere (or maybe I missed it).
The text was updated successfully, but these errors were encountered:
Do you mean filters that can either be provided or not by user? Yes, it's quite common, but implementation is tricky without parsing SQL. I mean, the filter should be totally ignored in such case
Do you mean filters that can either be provided or not by user? Yes, it's quite common, but implementation is tricky without parsing SQL. I mean, the filter should be totally ignored in such case
I've simplified the example above to not include that (though ofc you should be able to write (? IS NULL OR ? = some_nullable_field) (mostly leaving this comment for search reasons unless this should be included in examples)
Trying to write
fails at runtime with:
invalid param: invalid SQL: invalid argument: serialize_none is unsupported
The pattern of having nullable binds is quite common in server-side applications so I would have expected
Option<_>
support in binds somewhere (or maybe I missed it).The text was updated successfully, but these errors were encountered: