Skip to content

CqlValue misses conversion methods for some typesΒ #1207

@wprzytula

Description

@wprzytula

Problem

After FromCqlVal was removed, some issues arose. The legacy serialization framework involved deserializing CqlValue from the CQL result, and only then optional conversion/cast from CqlValue to end user types.
Via FromCqlVal::from_cql_val it was possible for a lot of types to be created from CqlValue. Now, after we removed FromCqlVal, what's left is the conversion methods on CqlValue.

Missing conversion methods for some types

Some types that were previously constructible from CqlValue via FromCqlVal::from_cql_val are no longer convertible. This includes (among others):

  • chrono types,
  • time types,
  • TODO: list remaining ones.

Such conversion functions might be useful for dynamic use cases, such as JS driver.

Suggested solution: add as_<type> cast methods onto CqlValue.

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions