Skip to main content

DdlExtractor

Trait DdlExtractor 

Source
pub trait DdlExtractor: Send + Sync {
    // Required methods
    fn extract_ddl(&self, message: &str) -> Option<CapturedDdl>;
    fn parse_schema_table(&self, statement: &str) -> Option<(String, String)>;
    fn parse_create_table_schema(&self, statement: &str) -> Option<TableSchema>;
}
Expand description

Trait for extracting DDL from source-specific message formats.

Required Methods§

Source

fn extract_ddl(&self, message: &str) -> Option<CapturedDdl>

Extract DDL from a source message if it contains a DDL statement. Returns None if the message is not DDL-related (e.g., DML or control message).

Source

fn parse_schema_table(&self, statement: &str) -> Option<(String, String)>

Parse a DDL statement to extract schema/table names.

Source

fn parse_create_table_schema(&self, statement: &str) -> Option<TableSchema>

Parse a CREATE TABLE statement to extract schema information.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§