diff --git a/fuzz/fuzz_seeds/postgres_alter_role_set.sql b/fuzz/fuzz_seeds/postgres_alter_role_set.sql new file mode 100644 index 0000000000..e3fca01f17 --- /dev/null +++ b/fuzz/fuzz_seeds/postgres_alter_role_set.sql @@ -0,0 +1,2 @@ +ALTER ROLE app IN DATABASE d SET search_path = api, public; +ALTER ROLE app IN DATABASE d RESET TIME ZONE diff --git a/src/ast/dcl.rs b/src/ast/dcl.rs index 3fc6f0c89b..a3dc103d70 100644 --- a/src/ast/dcl.rs +++ b/src/ast/dcl.rs @@ -30,8 +30,8 @@ use sqlparser_derive::{Visit, VisitMut}; use super::{display_comma_separated, Expr, Ident, Password, Spanned}; use crate::ast::{ - display_separated, CascadeOption, CurrentGrantsKind, GrantObjects, Grantee, GranteeName, - ObjectName, Privileges, + display_separated, CascadeOption, ConfigurationSet, CurrentGrantsKind, GrantObjects, Grantee, + GranteeName, ObjectName, Privileges, }; use crate::tokenizer::Span; @@ -131,24 +131,12 @@ impl fmt::Display for RoleOption { } } -/// SET config value option: -/// * SET `configuration_parameter` { TO | = } { `value` | DEFAULT } -/// * SET `configuration_parameter` FROM CURRENT -#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))] -pub enum SetConfigValue { - /// Use the default value. - Default, - /// Use the current value (`FROM CURRENT`). - FromCurrent, - /// Set to the provided expression value. - Value(Expr), -} - /// RESET config option: /// * RESET `configuration_parameter` /// * RESET ALL +/// * RESET TIME ZONE +/// * RESET TRANSACTION ISOLATION LEVEL +/// * RESET SESSION AUTHORIZATION #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))] @@ -157,6 +145,26 @@ pub enum ResetConfig { ALL, /// Reset the named configuration parameter. ConfigName(ObjectName), + /// `TIME ZONE` + TimeZone, + /// `TRANSACTION ISOLATION LEVEL` + TransactionIsolationLevel, + /// `SESSION AUTHORIZATION` + SessionAuthorization, +} + +impl fmt::Display for ResetConfig { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + match self { + ResetConfig::ALL => f.write_str("RESET ALL"), + ResetConfig::ConfigName(name) => write!(f, "RESET {name}"), + ResetConfig::TimeZone => f.write_str("RESET TIME ZONE"), + ResetConfig::TransactionIsolationLevel => { + f.write_str("RESET TRANSACTION ISOLATION LEVEL") + } + ResetConfig::SessionAuthorization => f.write_str("RESET SESSION AUTHORIZATION"), + } + } } /// An `ALTER ROLE` (`Statement::AlterRole`) operation @@ -190,20 +198,14 @@ pub enum AlterRoleOperation { }, /// PostgreSQL /// - /// - /// `SET configuration_parameter { TO | = } { value | DEFAULT }` Set { - /// Configuration name to set. - config_name: ObjectName, - /// Value to assign to the configuration. - config_value: SetConfigValue, + /// The configuration parameter default to store. + config: ConfigurationSet, /// Optional database scope for the setting. in_database: Option, }, /// PostgreSQL /// - /// - /// `RESET configuration_parameter` | `RESET ALL` Reset { /// Configuration to reset. config_name: ResetConfig, @@ -228,19 +230,13 @@ impl fmt::Display for AlterRoleOperation { write!(f, "WITH {}", display_separated(options, " ")) } AlterRoleOperation::Set { - config_name, - config_value, + config, in_database, } => { if let Some(database_name) = in_database { write!(f, "IN DATABASE {database_name} ")?; } - - match config_value { - SetConfigValue::Default => write!(f, "SET {config_name} TO DEFAULT"), - SetConfigValue::FromCurrent => write!(f, "SET {config_name} FROM CURRENT"), - SetConfigValue::Value(expr) => write!(f, "SET {config_name} TO {expr}"), - } + write!(f, "{config}") } AlterRoleOperation::Reset { config_name, @@ -249,11 +245,7 @@ impl fmt::Display for AlterRoleOperation { if let Some(database_name) = in_database { write!(f, "IN DATABASE {database_name} ")?; } - - match config_name { - ResetConfig::ALL => write!(f, "RESET ALL"), - ResetConfig::ConfigName(name) => write!(f, "RESET {name}"), - } + write!(f, "{config_name}") } } } diff --git a/src/ast/ddl.rs b/src/ast/ddl.rs index 3085cd1750..1d38e79e8b 100644 --- a/src/ast/ddl.rs +++ b/src/ast/ddl.rs @@ -5420,7 +5420,7 @@ impl Spanned for AlterDatabase { } /// A `SET` clause that stores a configuration parameter default, as in -/// `ALTER DATABASE ... SET`. +/// `ALTER DATABASE ... SET` and `ALTER ROLE ... SET`. /// /// [PostgreSQL](https://www.postgresql.org/docs/current/sql-set.html) #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] @@ -6498,7 +6498,7 @@ pub enum AlterFunctionAction { /// `SET configuration_parameter { TO | = } { value | DEFAULT }` /// or `SET configuration_parameter FROM CURRENT` Set(FunctionDefinitionSetParam), - /// `RESET configuration_parameter` or `RESET ALL` + /// `RESET ...` Reset(ResetConfig), } @@ -6561,10 +6561,7 @@ impl fmt::Display for AlterFunctionAction { write!(f, "SUPPORT {support_function}") } AlterFunctionAction::Set(set_param) => write!(f, "{set_param}"), - AlterFunctionAction::Reset(reset_config) => match reset_config { - ResetConfig::ALL => write!(f, "RESET ALL"), - ResetConfig::ConfigName(name) => write!(f, "RESET {name}"), - }, + AlterFunctionAction::Reset(reset_config) => write!(f, "{reset_config}"), } } } diff --git a/src/ast/mod.rs b/src/ast/mod.rs index 8d5fe73e9a..c93fb849e5 100644 --- a/src/ast/mod.rs +++ b/src/ast/mod.rs @@ -61,7 +61,7 @@ pub use self::dcl::{ AlterDefaultPrivileges, AlterDefaultPrivilegesOperation, AlterRoleOperation, CreateRole, DefaultPrivilegesObjectType, DefaultPrivilegesOption, Grant, GrantRole, ResetConfig, Revoke, RevokeRole, RoleGrantOption, RoleGrantOptionValue, RoleKeyword, RoleOption, SecondaryRoles, - SetConfigValue, Use, + Use, }; pub use self::ddl::{ AggregateArgs, AggregateModifyKind, AggregateSignature, Alignment, AlterCollation, @@ -12476,31 +12476,16 @@ impl fmt::Display for VacuumStatement { } } -/// Variants of the RESET statement -#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] -#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))] -pub enum Reset { - /// Resets all session parameters to their default values. - ALL, - - /// Resets session authorization to the session user. - SessionAuthorization, - - /// Resets a specific session parameter to its default value. - ConfigurationParameter(ObjectName), -} - /// Resets a session parameter to its default value. /// ```sql -/// RESET { ALL | SESSION AUTHORIZATION | } +/// RESET { ALL | TIME ZONE | TRANSACTION ISOLATION LEVEL | SESSION AUTHORIZATION | } /// ``` #[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "visitor", derive(Visit, VisitMut))] pub struct ResetStatement { - /// The reset action to perform (either `ALL` or a specific configuration parameter). - pub reset: Reset, + /// What to reset. + pub reset: ResetConfig, } /// `REFRESH MATERIALIZED VIEW [ CONCURRENTLY ] name [ WITH [ NO ] DATA ]` @@ -12598,11 +12583,7 @@ impl fmt::Display for OptimizerHint { impl fmt::Display for ResetStatement { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match &self.reset { - Reset::ALL => write!(f, "RESET ALL"), - Reset::SessionAuthorization => write!(f, "RESET SESSION AUTHORIZATION"), - Reset::ConfigurationParameter(param) => write!(f, "RESET {}", param), - } + write!(f, "{}", self.reset) } } diff --git a/src/parser/alter.rs b/src/parser/alter.rs index 0396ed871a..f5a0292d49 100644 --- a/src/parser/alter.rs +++ b/src/parser/alter.rs @@ -22,8 +22,7 @@ use crate::{ AlterConnectorOwner, AlterPolicy, AlterPolicyOperation, AlterRoleOperation, AlterTrigger, AlterTriggerOperation, AlterUser, AlterUserAddMfaMethodOtp, AlterUserAddRoleDelegation, AlterUserModifyMfaMethod, AlterUserPassword, AlterUserRemoveRoleDelegation, - AlterUserSetPolicy, Expr, MfaMethodKind, Password, ResetConfig, RoleOption, SetConfigValue, - Statement, UserPolicyKind, + AlterUserSetPolicy, Expr, MfaMethodKind, Password, RoleOption, Statement, UserPolicyKind, }, dialect::{MsSqlDialect, PostgreSqlDialect}, keywords::Keyword, @@ -434,47 +433,15 @@ impl Parser<'_> { } // SET } else if self.parse_keyword(Keyword::SET) { - let config_name = self.parse_object_name(false)?; - // FROM CURRENT - if self.parse_keywords(&[Keyword::FROM, Keyword::CURRENT]) { - AlterRoleOperation::Set { - config_name, - config_value: SetConfigValue::FromCurrent, - in_database, - } - // { TO | = } { value | DEFAULT } - } else if self.consume_token(&Token::Eq) || self.parse_keyword(Keyword::TO) { - if self.parse_keyword(Keyword::DEFAULT) { - AlterRoleOperation::Set { - config_name, - config_value: SetConfigValue::Default, - in_database, - } - } else if let Ok(expr) = self.parse_expr() { - AlterRoleOperation::Set { - config_name, - config_value: SetConfigValue::Value(expr), - in_database, - } - } else { - self.expected_ref("config value", self.peek_token_ref())? - } - } else { - self.expected_ref("'TO' or '=' or 'FROM CURRENT'", self.peek_token_ref())? + AlterRoleOperation::Set { + config: self.parse_configuration_set()?, + in_database, } // RESET } else if self.parse_keyword(Keyword::RESET) { - if self.parse_keyword(Keyword::ALL) { - AlterRoleOperation::Reset { - config_name: ResetConfig::ALL, - in_database, - } - } else { - let config_name = self.parse_object_name(false)?; - AlterRoleOperation::Reset { - config_name: ResetConfig::ConfigName(config_name), - in_database, - } + AlterRoleOperation::Reset { + config_name: self.parse_reset_config()?, + in_database, } // option } else { diff --git a/src/parser/mod.rs b/src/parser/mod.rs index 1daf69e18f..0b77e5f3af 100644 --- a/src/parser/mod.rs +++ b/src/parser/mod.rs @@ -12300,12 +12300,7 @@ impl<'a> Parser<'a> { self.parse_function_definition_set_param()?, )) } else if self.parse_keyword(Keyword::RESET) { - let reset_config = if self.parse_keyword(Keyword::ALL) { - ResetConfig::ALL - } else { - ResetConfig::ConfigName(self.parse_object_name(false)?) - }; - Some(AlterFunctionAction::Reset(reset_config)) + Some(AlterFunctionAction::Reset(self.parse_reset_config()?)) } else { None }; @@ -12334,6 +12329,21 @@ impl<'a> Parser<'a> { Ok(FunctionDefinitionSetParam { name, value }) } + /// Parse what follows `RESET`, as a statement or in `ALTER ROLE` and `ALTER FUNCTION`. + fn parse_reset_config(&mut self) -> Result { + Ok(if self.parse_keyword(Keyword::ALL) { + ResetConfig::ALL + } else if self.parse_keywords(&[Keyword::TIME, Keyword::ZONE]) { + ResetConfig::TimeZone + } else if self.parse_keywords(&[Keyword::TRANSACTION, Keyword::ISOLATION, Keyword::LEVEL]) { + ResetConfig::TransactionIsolationLevel + } else if self.parse_keywords(&[Keyword::SESSION, Keyword::AUTHORIZATION]) { + ResetConfig::SessionAuthorization + } else { + ResetConfig::ConfigName(self.parse_object_name(false)?) + }) + } + fn parse_alter_function_actions( &mut self, ) -> Result<(Vec, bool), ParserError> { @@ -12632,7 +12642,7 @@ impl<'a> Parser<'a> { } /// Parse the clause after `SET` that stores a configuration parameter - /// default, as in `ALTER DATABASE ... SET`. + /// default, as in `ALTER DATABASE ... SET` and `ALTER ROLE ... SET`. /// /// [PostgreSQL Documentation](https://www.postgresql.org/docs/current/sql-set.html) fn parse_configuration_set(&mut self) -> Result { @@ -23161,19 +23171,8 @@ impl<'a> Parser<'a> { /// Parses a RESET statement fn parse_reset(&mut self) -> Result { - if self.parse_keyword(Keyword::ALL) { - return Ok(ResetStatement { reset: Reset::ALL }); - } - - if self.parse_keywords(&[Keyword::SESSION, Keyword::AUTHORIZATION]) { - return Ok(ResetStatement { - reset: Reset::SessionAuthorization, - }); - } - - let obj = self.parse_object_name(false)?; Ok(ResetStatement { - reset: Reset::ConfigurationParameter(obj), + reset: self.parse_reset_config()?, }) } diff --git a/tests/sqlparser_common.rs b/tests/sqlparser_common.rs index 9a944734ec..1fad55676b 100644 --- a/tests/sqlparser_common.rs +++ b/tests/sqlparser_common.rs @@ -20974,31 +20974,35 @@ fn parse_generic_unary_ops() { #[test] fn parse_reset_statement() { - match verified_stmt("RESET some_parameter") { - Statement::Reset(ResetStatement { - reset: Reset::ConfigurationParameter(o), - }) => assert_eq!(o, ObjectName::from(vec!["some_parameter".into()])), + let reset = |sql| match verified_stmt(sql) { + Statement::Reset(ResetStatement { reset }) => reset, _ => unreachable!(), - } - match verified_stmt("RESET some_extension.some_parameter") { - Statement::Reset(ResetStatement { - reset: Reset::ConfigurationParameter(o), - }) => assert_eq!( - o, - ObjectName::from(vec!["some_extension".into(), "some_parameter".into()]) - ), - _ => unreachable!(), - } - match verified_stmt("RESET ALL") { - Statement::Reset(ResetStatement { reset }) => assert_eq!(reset, Reset::ALL), - _ => unreachable!(), - } - match verified_stmt("RESET SESSION AUTHORIZATION") { - Statement::Reset(ResetStatement { reset }) => { - assert_eq!(reset, Reset::SessionAuthorization) - } - _ => unreachable!(), - } + }; + assert_eq!( + reset("RESET some_parameter"), + ResetConfig::ConfigName(ObjectName::from(vec!["some_parameter".into()])) + ); + assert_eq!( + reset("RESET some_extension.some_parameter"), + ResetConfig::ConfigName(ObjectName::from(vec![ + "some_extension".into(), + "some_parameter".into() + ])) + ); + assert_eq!(reset("RESET ALL"), ResetConfig::ALL); + assert_eq!( + reset("RESET SESSION AUTHORIZATION"), + ResetConfig::SessionAuthorization + ); + assert_eq!(reset("RESET TIME ZONE"), ResetConfig::TimeZone); + assert_eq!( + reset("RESET TRANSACTION ISOLATION LEVEL"), + ResetConfig::TransactionIsolationLevel + ); + assert_eq!( + parse_sql_statements("RESET").unwrap_err(), + ParserError::ParserError("Expected: identifier, found: EOF".to_string()) + ); } #[test] diff --git a/tests/sqlparser_postgres.rs b/tests/sqlparser_postgres.rs index f8e5df866f..445ff2e283 100644 --- a/tests/sqlparser_postgres.rs +++ b/tests/sqlparser_postgres.rs @@ -5123,98 +5123,50 @@ fn parse_alter_role() { assert_eq!( pg().verified_stmt(sql), Statement::AlterRole { - name: Ident { - value: "role_name".into(), - quote_style: None, - span: Span::empty(), - }, + name: Ident::new("role_name"), operation: AlterRoleOperation::Set { - config_name: ObjectName::from(vec![Ident { - value: "maintenance_work_mem".into(), - quote_style: None, - span: Span::empty(), - }]), - config_value: SetConfigValue::FromCurrent, + config: ConfigurationSet::Parameter(FunctionDefinitionSetParam { + name: ObjectName::from(vec![Ident::new("maintenance_work_mem")]), + value: FunctionSetValue::FromCurrent, + }), in_database: None }, } ); let sql = "ALTER ROLE role_name IN DATABASE database_name SET maintenance_work_mem = 100000"; + let expected = Statement::AlterRole { + name: Ident::new("role_name"), + operation: AlterRoleOperation::Set { + config: ConfigurationSet::Parameter(FunctionDefinitionSetParam { + name: ObjectName::from(vec![Ident::new("maintenance_work_mem")]), + value: FunctionSetValue::Values(vec![Expr::value(number("100000"))]), + }), + in_database: Some(ObjectName::from(vec![Ident::new("database_name")])), + }, + }; + assert_eq!(pg().verified_stmt(sql), expected); assert_eq!( - pg().parse_sql_statements(sql).unwrap(), - [Statement::AlterRole { - name: Ident { - value: "role_name".into(), - quote_style: None, - span: Span::empty(), - }, - operation: AlterRoleOperation::Set { - config_name: ObjectName::from(vec![Ident { - value: "maintenance_work_mem".into(), - quote_style: None, - span: Span::empty(), - }]), - config_value: SetConfigValue::Value(Expr::Value( - (number("100000")).with_empty_span() - )), - in_database: Some(ObjectName::from(vec![Ident { - value: "database_name".into(), - quote_style: None, - span: Span::empty(), - }])) - }, - }] - ); - - let sql = "ALTER ROLE role_name IN DATABASE database_name SET maintenance_work_mem TO 100000"; - assert_eq!( - pg().verified_stmt(sql), - Statement::AlterRole { - name: Ident { - value: "role_name".into(), - quote_style: None, - span: Span::empty(), - }, - operation: AlterRoleOperation::Set { - config_name: ObjectName::from(vec![Ident { - value: "maintenance_work_mem".into(), - quote_style: None, - span: Span::empty(), - }]), - config_value: SetConfigValue::Value(Expr::Value( - (number("100000")).with_empty_span() - )), - in_database: Some(ObjectName::from(vec![Ident { - value: "database_name".into(), - quote_style: None, - span: Span::empty(), - }])) - }, - } + pg().one_statement_parses_to( + "ALTER ROLE role_name IN DATABASE database_name SET maintenance_work_mem TO 100000", + sql + ), + expected ); - let sql = "ALTER ROLE role_name IN DATABASE database_name SET maintenance_work_mem TO DEFAULT"; assert_eq!( - pg().verified_stmt(sql), + pg().one_statement_parses_to( + "ALTER ROLE role_name IN DATABASE database_name SET maintenance_work_mem TO DEFAULT", + "ALTER ROLE role_name IN DATABASE database_name SET maintenance_work_mem = DEFAULT" + ), Statement::AlterRole { - name: Ident { - value: "role_name".into(), - quote_style: None, - span: Span::empty(), - }, + name: Ident::new("role_name"), operation: AlterRoleOperation::Set { - config_name: ObjectName::from(vec![Ident { - value: "maintenance_work_mem".into(), - quote_style: None, - span: Span::empty(), - }]), - config_value: SetConfigValue::Default, - in_database: Some(ObjectName::from(vec![Ident { - value: "database_name".into(), - quote_style: None, - span: Span::empty(), - }])) + config: ConfigurationSet::Parameter(FunctionDefinitionSetParam { + name: ObjectName::from(vec![Ident::new("maintenance_work_mem")]), + value: FunctionSetValue::Default, + }), + in_database: Some(ObjectName::from(vec![Ident::new("database_name")])), }, } ); @@ -5297,13 +5249,15 @@ fn parse_alter_user() { assert_eq!( pg().one_statement_parses_to( "ALTER USER bob SET search_path TO public", - "ALTER ROLE bob SET search_path TO public" + "ALTER ROLE bob SET search_path = public" ), Statement::AlterRole { name: Ident::new("bob"), operation: AlterRoleOperation::Set { - config_name: ObjectName::from(vec![Ident::new("search_path")]), - config_value: SetConfigValue::Value(Expr::Identifier(Ident::new("public"))), + config: ConfigurationSet::Parameter(FunctionDefinitionSetParam { + name: ObjectName::from(vec![Ident::new("search_path")]), + value: FunctionSetValue::Values(vec![Expr::Identifier(Ident::new("public"))]), + }), in_database: None, }, } @@ -14761,3 +14715,95 @@ fn parse_alter_database_set() { ); } } + +#[test] +fn parse_alter_role_set() { + assert_eq!( + pg().verified_stmt("ALTER ROLE app SET search_path = api, public"), + Statement::AlterRole { + name: Ident::new("app"), + operation: AlterRoleOperation::Set { + config: ConfigurationSet::Parameter(FunctionDefinitionSetParam { + name: ObjectName::from(vec![Ident::new("search_path")]), + value: FunctionSetValue::Values(vec![ + Expr::Identifier(Ident::new("api")), + Expr::Identifier(Ident::new("public")), + ]), + }), + in_database: None, + }, + } + ); + assert_eq!( + pg().verified_stmt("ALTER ROLE app IN DATABASE d SET TIME ZONE 'Europe/Rome'"), + Statement::AlterRole { + name: Ident::new("app"), + operation: AlterRoleOperation::Set { + config: ConfigurationSet::TimeZone(Expr::Value( + Value::SingleQuotedString("Europe/Rome".to_string()).with_empty_span() + )), + in_database: Some(ObjectName::from(vec![Ident::new("d")])), + }, + } + ); + + pg().verified_stmt("ALTER ROLE app IN DATABASE d SET search_path = api, public"); + pg().verified_stmt("ALTER ROLE app SET XML OPTION DOCUMENT"); + pg().one_statement_parses_to( + r#"ALTER ROLE app SET search_path TO "$user", public"#, + r#"ALTER ROLE app SET search_path = "$user", public"#, + ); + + for (sql, error) in [ + ( + "ALTER ROLE app SET search_path", + "Expected: = or TO, found: EOF", + ), + ( + "ALTER ROLE app SET search_path = api,", + "Expected: an expression, found: EOF", + ), + ] { + assert_eq!( + pg().parse_sql_statements(sql).unwrap_err(), + ParserError::ParserError(error.to_string()), + "{sql}" + ); + } +} + +#[test] +fn parse_alter_role_reset() { + assert_eq!( + pg().verified_stmt("ALTER ROLE app IN DATABASE d RESET TIME ZONE"), + Statement::AlterRole { + name: Ident::new("app"), + operation: AlterRoleOperation::Reset { + config_name: ResetConfig::TimeZone, + in_database: Some(ObjectName::from(vec![Ident::new("d")])), + }, + } + ); + assert_eq!( + pg().verified_stmt("ALTER ROLE app RESET time"), + Statement::AlterRole { + name: Ident::new("app"), + operation: AlterRoleOperation::Reset { + config_name: ResetConfig::ConfigName(ObjectName::from(vec![Ident::new("time")])), + in_database: None, + }, + } + ); + + pg().verified_stmt("ALTER ROLE app RESET SESSION AUTHORIZATION"); + pg().verified_stmt("ALTER ROLE app RESET TRANSACTION ISOLATION LEVEL"); + pg().verified_stmt("ALTER FUNCTION f(INT) RESET TIME ZONE"); + + for sql in ["ALTER ROLE app RESET", "ALTER FUNCTION f(INT) RESET"] { + assert_eq!( + pg().parse_sql_statements(sql).unwrap_err(), + ParserError::ParserError("Expected: identifier, found: EOF".to_string()), + "{sql}" + ); + } +}