pub fn primary_key_columns(&self) -> Vec<&ColumnSummary> {
        use InfluxDbType::*;
        let mut key_summaries: Vec<&ColumnSummary> = self
            .columns
            .iter()
            .filter(|s| match s.influxdb_type {
                Some(Tag) => true,
                Some(Field) => false,
                Some(Timestamp) => true,
                None => false,
            })
            .collect();

        // Now, sort lexographically (but put timestamp last)
        key_summaries.sort_by(
            |a, b| match (a.influxdb_type.as_ref(), b.influxdb_type.as_ref()) {
                (Some(Tag), Some(Tag)) => a.name.cmp(&b.name),
                (Some(Timestamp), Some(Tag)) => Ordering::Greater,
                (Some(Tag), Some(Timestamp)) => Ordering::Less,
                (Some(Timestamp), Some(Timestamp)) => panic!("multiple timestamps in summary"),
                _ => panic!("Unexpected types in key summary"),
            },
        );

        key_summaries
    }
/// Return the columns used for the "primary key" in this table.
///
/// Currently this relies on the InfluxDB data model annotations
/// for what columns to include in the key columns
Return the columns used for the "primary key" in this table.
Currently this relies on the InfluxDB data model annotations
for what columns to include in the key columns
Return the columns used for the " primary key " in this table . Currently this relies on the InfluxDB data model annotations for what columns to include in the key columns
pub fn primary_key_columns(&self) -> Vec<&ColumnSummary> {
        use InfluxDbType::*;
        let mut key_summaries: Vec<&ColumnSummary> = self
            .columns
            .iter()
            .filter(|s| match s.influxdb_type {
                Some(Tag) => true,
                Some(Field) => false,
                Some(Timestamp) => true,
                None => false,
            })
            .collect();
        // Now, sort lexographically (but put timestamp last)
        key_summaries.sort_by(
            |a, b| match (a.influxdb_type.as_ref(), b.influxdb_type.as_ref()) {
                (Some(Tag), Some(Tag)) => a.name.cmp(&b.name),
                (Some(Timestamp), Some(Tag)) => Ordering::Greater,
                (Some(Tag), Some(Timestamp)) => Ordering::Less,
                (Some(Timestamp), Some(Timestamp)) => panic!("multiple timestamps in summary"),
                _ => panic!("Unexpected types in key summary"),
            },
        );
        key_summaries
    }
pub fn primary_key_columns ( & self ) -> Vec < & ColumnSummary > { use InfluxDbType :: * ; let mut key_summaries : Vec < & ColumnSummary > = self . columns . iter ( ) . filter ( | s | match s . influxdb_type { Some ( Tag ) => true , Some ( Field ) => false , Some ( Timestamp ) => true , None => false , } ) . collect ( ) ; // Now, sort lexographically (but put timestamp last) key_summaries . sort_by ( | a , b | match ( a . influxdb_type . as_ref ( ) , b . influxdb_type . as_ref ( ) ) { ( Some ( Tag ) , Some ( Tag ) ) => a . name . cmp ( & b . name ) , ( Some ( Timestamp ) , Some ( Tag ) ) => Ordering :: Greater , ( Some ( Tag ) , Some ( Timestamp ) ) => Ordering :: Less , ( Some ( Timestamp ) , Some ( Timestamp ) ) => panic ! ( " " ) , _ => panic ! ( " " ) , } , ) ; key_summaries }
Return the columns used for the "primary key" in this table.
Return the columns used for the " primary key " in this table .
&self
&self