mirror of
https://github.com/apache/datafusion-sqlparser-rs.git
synced 2025-10-12 23:12:01 +00:00
Add dialect_from_str
and improve Dialect
documentation (#848)
* Add `dialect_from_str` and improve `Dialect` documentation * cleanup * fix compilation with nostd
This commit is contained in:
parent
d8af92536c
commit
5ecf633e31
4 changed files with 99 additions and 8 deletions
19
src/lib.rs
19
src/lib.rs
|
@ -10,17 +10,18 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//! SQL Parser for Rust
|
||||
//! # SQL Parser for Rust
|
||||
//!
|
||||
//! This crate provides an ANSI:SQL 2011 lexer and parser that can parse SQL
|
||||
//! into an Abstract Syntax Tree (AST). See the [sqlparser crates.io page]
|
||||
//! into an Abstract Syntax Tree ([`AST`]). See the [sqlparser crates.io page]
|
||||
//! for more information.
|
||||
//!
|
||||
//! See [`Parser::parse_sql`](crate::parser::Parser::parse_sql) and
|
||||
//! [`Parser::new`](crate::parser::Parser::new) for the Parsing API
|
||||
//! and the [`ast`](crate::ast) crate for the AST structure.
|
||||
//! For more information:
|
||||
//! 1. [`Parser::parse_sql`] and [`Parser::new`] for the Parsing API
|
||||
//! 2. [`ast`] for the AST structure
|
||||
//! 3. [`Dialect`] for supported SQL dialects
|
||||
//!
|
||||
//! Example:
|
||||
//! # Example
|
||||
//!
|
||||
//! ```
|
||||
//! use sqlparser::dialect::GenericDialect;
|
||||
|
@ -37,7 +38,13 @@
|
|||
//!
|
||||
//! println!("AST: {:?}", ast);
|
||||
//! ```
|
||||
//!
|
||||
//! [sqlparser crates.io page]: https://crates.io/crates/sqlparser
|
||||
//! [`Parser::parse_sql`]: crate::parser::Parser::parse_sql
|
||||
//! [`Parser::new`]: crate::parser::Parser::new
|
||||
//! [`AST`]: crate::ast
|
||||
//! [`ast`]: crate::ast
|
||||
//! [`Dialect`]: crate::dialect::Dialect
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
#![allow(clippy::upper_case_acronyms)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue