Function coerce
Compatibility layer for MySQLVal. These functions provide methods that TaggedAlgebraic does not provide in order to keep functionality that was available with Variant.
Notes
The type
shim should be avoided in favor of using the kind
property of
TaggedAlgebraic.
The get
shim works differently than the TaggedAlgebraic version, as the
Variant get function would provide implicit type conversions, but the
TaggedAlgebraic version does not.
All shims other than type
will likely remain as convenience features.
Note that peek
is inferred @system because it returns a pointer to the
provided value.
See the Safe Migration document for more details.