sql
ModuleThe SQL classification shared by the SQL wire protocols.
Contents
use utopia_query::classifier::sql::Sql;Rust
pub trait Sql: ClassifierClassifies SQL text by its leading keyword: the logic shared by the SQL
wire protocol classifiers (super::MySql, super::PostgreSql),
which implement Classifier::classify for their packet format and
hand the SQL text to Sql::classify_sql.
Handles leading whitespace, -- and /* */ comments, quoted literals and
identifiers ('..', "..", `..`, $tag$..$tag$), mixed case,
COPY ... TO (read) against COPY ... FROM (write), and CTEs
(WITH ... SELECT reads, WITH ... INSERT writes).