Skip to content

Row._nulls can go away #216

Open
Open
@schveiguy

Description

@schveiguy

This comment exists in mysql.result:

I have been agitating for some kind of null indicator that can be set for a
Variant without destroying its inherent type information. If this were the
case, then the bool array could disappear.

Looking at the code in mysql.comms, when a field is null, it's value is set to null, meaning the type information is gone anyway. Essentially you can replace _nulls[i] with _values[i].type == typeid(typeof(null)) and I think you can remove that array.

I would hold off until the safe update, as the code to do this is MUCH simpler and better performing when we are using MySQLVal instead of Variant (i.e. _values[i].kind == MySQLVal.Kind.Null). I don't want to do it in that PR since there's enough happening.

But I wanted to leave this enhancement in here so I don't forget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions