From e976a2ee43e3310c19c2f55942e928b27f29fc55 Mon Sep 17 00:00:00 2001 From: sunxunle <163647374+sunxunle@users.noreply.github.com> Date: Sun, 7 Apr 2024 01:06:53 +0800 Subject: [PATCH] chore: fix some comments (#1184) Signed-off-by: sunxunle --- README.md | 2 +- src/ast/mod.rs | 2 +- src/dialect/mod.rs | 2 +- tests/sqlparser_sqlite.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8a4b5d98..512f5f6c 100644 --- a/README.md +++ b/README.md @@ -151,7 +151,7 @@ maintain this crate is limited. Please read the following sections carefully. ### New Syntax The most commonly accepted PRs add support for or fix a bug in a feature in the -SQL standard, or a a popular RDBMS, such as Microsoft SQL +SQL standard, or a popular RDBMS, such as Microsoft SQL Server or PostgreSQL, will likely be accepted after a brief review. Any SQL feature that is dialect specific should be parsed by *both* the relevant [`Dialect`] as well as [`GenericDialect`]. diff --git a/src/ast/mod.rs b/src/ast/mod.rs index 9df0b5de..9b3bf3f6 100644 --- a/src/ast/mod.rs +++ b/src/ast/mod.rs @@ -4649,7 +4649,7 @@ pub struct Function { pub args: Vec, /// e.g. `x > 5` in `COUNT(x) FILTER (WHERE x > 5)` pub filter: Option>, - // Snowflake/MSSQL supports diffrent options for null treatment in rank functions + // Snowflake/MSSQL supports different options for null treatment in rank functions pub null_treatment: Option, pub over: Option, // aggregate functions may specify eg `COUNT(DISTINCT x)` diff --git a/src/dialect/mod.rs b/src/dialect/mod.rs index 2873cca2..0e7257b7 100644 --- a/src/dialect/mod.rs +++ b/src/dialect/mod.rs @@ -93,7 +93,7 @@ macro_rules! dialect_of { pub trait Dialect: Debug + Any { /// Determine the [`TypeId`] of this dialect. /// - /// By default, return the same [`TypeId`] as [`Any::type_id`]. Can be overriden + /// By default, return the same [`TypeId`] as [`Any::type_id`]. Can be overridden /// by dialects that behave like other dialects /// (for example when wrapping a dialect). fn dialect(&self) -> TypeId { diff --git a/tests/sqlparser_sqlite.rs b/tests/sqlparser_sqlite.rs index 3452355a..0352b4ec 100644 --- a/tests/sqlparser_sqlite.rs +++ b/tests/sqlparser_sqlite.rs @@ -55,7 +55,7 @@ fn pragma_eq_style() { } } #[test] -fn pragma_funciton_style() { +fn pragma_function_style() { let sql = "PRAGMA cache_size(10)"; match sqlite_and_generic().verified_stmt(sql) { Statement::Pragma { @@ -103,7 +103,7 @@ fn pragma_function_string_style() { } #[test] -fn pragma_eq_placehoder_style() { +fn pragma_eq_placeholder_style() { let sql = "PRAGMA table_info = ?"; match sqlite_and_generic().verified_stmt(sql) { Statement::Pragma {