Skip to main content

ProfileTable

Trait ProfileTable 

Source
pub trait ProfileTable:
    Debug
    + Send
    + Sync
    + Clone
    + Copy
    + 'static {
    type Row: Debug + Sync + Send;

    const COLUMNS: &[ProfileColumn];

    // Required methods
    fn profile_as_rows(profile: &QueryProfile) -> Result<Vec<Self::Row>>;
    fn scan(
        rows: &[Self::Row],
        projections: &Projections,
        output: &mut Batch,
    ) -> Result<()>;

    // Provided method
    fn column_schema() -> ColumnSchema { ... }
}

Required Associated Constants§

Required Associated Types§

Required Methods§

Source

fn profile_as_rows(profile: &QueryProfile) -> Result<Vec<Self::Row>>

Converts the query profile into rows.

Source

fn scan( rows: &[Self::Row], projections: &Projections, output: &mut Batch, ) -> Result<()>

Scan the rows into the output batch.

The number of rows provided will not exceed the write capacity of the batch.

Provided Methods§

Source

fn column_schema() -> ColumnSchema

Generate the column schema for the table.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§