Derive Macro Row

Source
#[derive(Row)]
{
    // Attributes available to this derive:
    #[clickhouse_arrow]
}
Expand description

Derive macro for the Row trait.

This is similar in usage and implementation to the serde::Serialize and serde::Deserialize derive macros.

§serde attributes

The following serde attributes are supported, using #[clickhouse_arrow(...)] instead of #[serde(...)]:

  • with
  • from and into
  • try_from
  • skip
  • default
  • deny_unknown_fields
  • rename
  • rename_all
  • serialize_with, deserialize_with
  • skip_deserializing, skip_serializing
  • flatten
    • Index-based matching is disabled (the column names must match exactly).
    • Due to the current interface of the Row trait, performance might not be optimal, as a value map must be reconstitued for each flattened subfield.

§ClickHouse-specific attributes

§Known issues

  • For serialization, the ordering of fields in the struct declaration must match the order in the INSERT statement, respectively in the table declaration. See issue #34.