Skip to main content

TableValueRow

Derive Macro TableValueRow 

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

Generates a trivial implementation of the TableValueRow trait.

§Applications

Apply to structs that represent rows of a table-valued parameter.

§Example

#[derive(TableValueRow)]
pub struct SomeGeoList {
  #[colname = "SomeID"]
  pub id: i32,
  #[colname = "LastSyncIPGeoLat"]
  pub lat: Numeric,
  #[colname = "LastSyncIPGeoLong"]
  pub lon: Numeric,
}