pub struct Source {Show 21 fields
pub id: u32,
pub schema_id: u32,
pub database_id: u32,
pub name: String,
pub row_id_index: Option<u32>,
pub columns: Vec<ColumnCatalog>,
pub pk_column_ids: Vec<i32>,
pub with_properties: BTreeMap<String, String>,
pub owner: u32,
pub info: Option<StreamSourceInfo>,
pub watermark_descs: Vec<WatermarkDesc>,
pub definition: String,
pub connection_id: Option<u32>,
pub initialized_at_epoch: Option<u64>,
pub created_at_epoch: Option<u64>,
pub initialized_at_cluster_version: Option<String>,
pub created_at_cluster_version: Option<String>,
pub secret_refs: BTreeMap<String, SecretRef>,
pub version: u64,
pub rate_limit: Option<u32>,
pub optional_associated_table_id: Option<OptionalAssociatedTableId>,
}
Fields§
§id: u32
For shared source, this is the same as the job id. For non-shared source and table with connector, this is a different oid.
schema_id: u32
§database_id: u32
§name: String
§row_id_index: Option<u32>
The column index of row ID. If the primary key is specified by the user,
this will be None
.
columns: Vec<ColumnCatalog>
Columns of the source.
pk_column_ids: Vec<i32>
Column id of the primary key specified by the user. If the user does not specify a primary key, the vector will be empty.
with_properties: BTreeMap<String, String>
Properties specified by the user in WITH clause.
owner: u32
§info: Option<StreamSourceInfo>
§watermark_descs: Vec<WatermarkDesc>
Define watermarks on the source. The repeated
is just for forward
compatibility, currently, only one watermark on the source
definition: String
§connection_id: Option<u32>
§initialized_at_epoch: Option<u64>
§created_at_epoch: Option<u64>
§initialized_at_cluster_version: Option<String>
Cluster version (tracked by git commit) when initialized/created
created_at_cluster_version: Option<String>
§secret_refs: BTreeMap<String, SecretRef>
Handle the source relies on any sceret. The key is the propertity name and the value is the secret id. Used for secret connect options.
version: u64
Per-source catalog version, used by schema change.
rate_limit: Option<u32>
§optional_associated_table_id: Option<OptionalAssociatedTableId>
Indicate whether this source is created by table.
Implementations§
source§impl Source
impl Source
sourcepub fn row_id_index(&self) -> u32
pub fn row_id_index(&self) -> u32
Returns the value of row_id_index
, or the default value if row_id_index
is unset.
sourcepub fn connection_id(&self) -> u32
pub fn connection_id(&self) -> u32
Returns the value of connection_id
, or the default value if connection_id
is unset.
sourcepub fn initialized_at_epoch(&self) -> u64
pub fn initialized_at_epoch(&self) -> u64
Returns the value of initialized_at_epoch
, or the default value if initialized_at_epoch
is unset.
sourcepub fn created_at_epoch(&self) -> u64
pub fn created_at_epoch(&self) -> u64
Returns the value of created_at_epoch
, or the default value if created_at_epoch
is unset.
sourcepub fn initialized_at_cluster_version(&self) -> &str
pub fn initialized_at_cluster_version(&self) -> &str
Returns the value of initialized_at_cluster_version
, or the default value if initialized_at_cluster_version
is unset.
sourcepub fn created_at_cluster_version(&self) -> &str
pub fn created_at_cluster_version(&self) -> &str
Returns the value of created_at_cluster_version
, or the default value if created_at_cluster_version
is unset.
sourcepub fn rate_limit(&self) -> u32
pub fn rate_limit(&self) -> u32
Returns the value of rate_limit
, or the default value if rate_limit
is unset.
source§impl Source
impl Source
pub fn get_id(&self) -> u32
pub fn get_schema_id(&self) -> u32
pub fn get_database_id(&self) -> u32
pub fn get_name(&self) -> &String
pub fn get_row_id_index(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_columns(&self) -> &Vec<ColumnCatalog>
pub fn get_pk_column_ids(&self) -> &Vec<i32>
pub fn get_with_properties(&self) -> &BTreeMap<String, String>
pub fn get_owner(&self) -> u32
pub fn get_info(&self) -> Result<&StreamSourceInfo, PbFieldNotFound>
pub fn get_watermark_descs(&self) -> &Vec<WatermarkDesc>
pub fn get_definition(&self) -> &String
pub fn get_connection_id(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_initialized_at_epoch(&self) -> Result<&u64, PbFieldNotFound>
pub fn get_created_at_epoch(&self) -> Result<&u64, PbFieldNotFound>
pub fn get_initialized_at_cluster_version( &self, ) -> Result<&String, PbFieldNotFound>
pub fn get_created_at_cluster_version(&self) -> Result<&String, PbFieldNotFound>
pub fn get_secret_refs(&self) -> &BTreeMap<String, SecretRef>
pub fn get_version(&self) -> u64
pub fn get_rate_limit(&self) -> Result<&u32, PbFieldNotFound>
pub fn get_optional_associated_table_id( &self, ) -> Result<&OptionalAssociatedTableId, PbFieldNotFound>
Trait Implementations§
source§impl<'de> Deserialize<'de> for Source
impl<'de> Deserialize<'de> for Source
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
source§impl Message for Source
impl Message for Source
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.impl StructuralPartialEq for Source
Auto Trait Implementations§
impl Freeze for Source
impl RefUnwindSafe for Source
impl Send for Source
impl Sync for Source
impl Unpin for Source
impl UnwindSafe for Source
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request