MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / into_parser_statement

Method into_parser_statement

src/mz-deploy/src/project/ast.rs:177–189  ·  view source on GitHub ↗

Convert into the parser's `Statement ` enum without re-parsing.

(self)

Source from the content-addressed store, hash-verified

175
176 /// Convert into the parser's `Statement<Raw>` enum without re-parsing.
177 pub fn into_parser_statement(self) -> mz_sql_parser::ast::Statement<Raw> {
178 use mz_sql_parser::ast::Statement as Parser;
179 match self {
180 Statement::CreateSink(s) => Parser::CreateSink(s),
181 Statement::CreateView(s) => Parser::CreateView(s),
182 Statement::CreateMaterializedView(s) => Parser::CreateMaterializedView(s),
183 Statement::CreateTable(s) => Parser::CreateTable(s),
184 Statement::CreateTableFromSource(s) => Parser::CreateTableFromSource(s),
185 Statement::CreateSource(s) => Parser::CreateSource(s),
186 Statement::CreateSecret(s) => Parser::CreateSecret(s),
187 Statement::CreateConnection(s) => Parser::CreateConnection(s),
188 }
189 }
190
191 /// Extracts the database identifier from the statement.
192 ///

Callers 1

create_catalog_item_astFunction · 0.80

Calls 4

CreateSinkClass · 0.85
CreateViewClass · 0.85
CreateSourceClass · 0.85
CreateTableClass · 0.50

Tested by

no test coverage detected