Skip to main content

FromSql

Derive Macro FromSql 

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

Derives FromSql for converting a BigQuery STRUCT value into a Rust struct.

Structs with named fields match STRUCT fields by field name (or via #[bigquery(rename = "new_name")]). Tuple structs match STRUCT fields positionally by 0-based index, supporting anonymous STRUCT(1, 'a') fields and ordered positional extraction.