risingwave_connector/source/cdc/
mariadb.rs1use std::collections::BTreeMap;
16
17use risingwave_pb::secret::PbSecretRef;
18
19use crate::error::ConnectorResult;
20use crate::source::cdc::{
21 CdcSourceDdlValidator, CdcSourceExternalTableIdentifier, CdcSourceRuntimeFlags,
22 CdcSourceTypeTrait, Mariadb, Mysql, check_alter_with_options_inner, check_common_with_options,
23};
24
25impl CdcSourceRuntimeFlags for Mariadb {
28 const CAN_BACKFILL: bool = true;
29 const CAN_USE_TRANSACTION_METADATA: bool = true;
30 const NEEDS_NON_EMPTY_INITIAL_OFFSET: bool = true;
31}
32
33impl CdcSourceDdlValidator for Mariadb {
36 fn check_and_fill_create_with_options(
37 props: &mut BTreeMap<String, String>,
38 ) -> ConnectorResult<()> {
39 Mysql::check_and_fill_create_with_options(props)
41 }
42
43 fn check_alter_with_options(
44 props: &BTreeMap<String, String>,
45 secret_refs: &BTreeMap<String, PbSecretRef>,
46 ) -> ConnectorResult<()> {
47 check_common_with_options(props)?;
48 check_alter_with_options_inner(
49 Self::CDC_CONNECTOR_NAME,
50 props,
51 secret_refs,
52 &[
53 "cdc.source.wait.streaming.start.timeout",
54 "debezium.max.queue.size",
55 "debezium.queue.memory.ratio",
56 "hostname",
57 "port",
58 "password",
59 ],
60 )
61 }
62}
63
64impl CdcSourceExternalTableIdentifier for Mariadb {}