pub trait SourceConnection: Debug + Clone + PartialEq {
    // Required methods
    fn name(&self) -> &'static str;
    fn upstream_name(&self) -> Option<&str>;
    fn timestamp_desc(&self) -> RelationDesc;
    fn connection_id(&self) -> Option<GlobalId>;
    fn metadata_columns(&self) -> Vec<(&str, ColumnType)>;
    fn metadata_column_types(&self) -> Vec<IncludedColumnSource>;

    // Provided method
    fn alter_compatible(
        &self,
        id: GlobalId,
        other: &Self
    ) -> Result<(), StorageError> { ... }
}
Expand description

A connection to an external system

Required Methods§

source

fn name(&self) -> &'static str

The name of the external system (e.g kafka, postgres, etc).

source

fn upstream_name(&self) -> Option<&str>

The name of the resource in the external system (e.g kafka topic) if any

source

fn timestamp_desc(&self) -> RelationDesc

The schema of this connection’s timestamp type. This will also be the schema of the progress relation.

source

fn connection_id(&self) -> Option<GlobalId>

The id of the connection object (i.e the one obtained from running CREATE CONNECTION) in the catalog, if any.

source

fn metadata_columns(&self) -> Vec<(&str, ColumnType)>

Returns available metadata columns that this connection offers in (name, type) pairs in the order specified by the user.

source

fn metadata_column_types(&self) -> Vec<IncludedColumnSource>

The available metadata columns in the order specified by the user. This only identifies the kinds of columns that this source offers without any further information.

Provided Methods§

source

fn alter_compatible( &self, id: GlobalId, other: &Self ) -> Result<(), StorageError>

Determines if self is compatible with another SourceConnection, in such a way that it is possible to turn self into other through a valid series of transformations (e.g. no transformation or ALTER SOURCE).

Note that the default implementation errors unless the two are equal. To support any modifying transformations, you must specify the implementation.

Implementors§