MCPcopy Create free account
hub / github.com/apache/datafusion / parse_sql

Method parse_sql

datafusion/sql/src/parser.rs:460–464  ·  view source on GitHub ↗

Parse a sql string into one or [`Statement`]s using the [`GenericDialect`].

(sql: &'a str)

Source from the content-addressed store, hash-verified

458 /// Parse a sql string into one or [`Statement`]s using the
459 /// [`GenericDialect`].
460 pub fn parse_sql(sql: &'a str) -> Result<VecDeque<Statement>, DataFusionError> {
461 let mut parser = DFParserBuilder::new(sql).build()?;
462
463 parser.parse_statements()
464 }
465
466 /// Parse a SQL string and produce one or more [`Statement`]s with
467 /// with the specified dialect.

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
parse_statementsMethod · 0.80
buildMethod · 0.45

Tested by

no test coverage detected