From b93b87f2a1d60d4fe0774419d43f2495e6e7bcf7 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Mon, 20 Jun 2022 12:28:05 +0100 Subject: [PATCH] Remove unused CONNECT clause on DEFINE SCOPE statements --- lib/src/sql/statements/define.rs | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/src/sql/statements/define.rs b/lib/src/sql/statements/define.rs index 6968ef1b..84fac093 100644 --- a/lib/src/sql/statements/define.rs +++ b/lib/src/sql/statements/define.rs @@ -429,7 +429,6 @@ pub struct DefineScopeStatement { pub session: Option, pub signup: Option, pub signin: Option, - pub connect: Option, } impl DefineScopeStatement { @@ -468,9 +467,6 @@ impl fmt::Display for DefineScopeStatement { if let Some(ref v) = self.signin { write!(f, " {}", v)? } - if let Some(ref v) = self.connect { - write!(f, " {}", v)? - } Ok(()) } } @@ -503,10 +499,6 @@ fn scope(i: &str) -> IResult<&str, DefineScopeStatement> { DefineScopeOption::Signin(ref v) => Some(v.to_owned()), _ => None, }), - connect: opts.iter().find_map(|x| match x { - DefineScopeOption::Connect(ref v) => Some(v.to_owned()), - _ => None, - }), }, )) } @@ -516,11 +508,10 @@ pub enum DefineScopeOption { Session(Duration), Signup(Value), Signin(Value), - Connect(Value), } fn scope_opts(i: &str) -> IResult<&str, DefineScopeOption> { - alt((scope_session, scope_signup, scope_signin, scope_connect))(i) + alt((scope_session, scope_signup, scope_signin))(i) } fn scope_session(i: &str) -> IResult<&str, DefineScopeOption> { @@ -547,14 +538,6 @@ fn scope_signin(i: &str) -> IResult<&str, DefineScopeOption> { Ok((i, DefineScopeOption::Signin(v))) } -fn scope_connect(i: &str) -> IResult<&str, DefineScopeOption> { - let (i, _) = shouldbespace(i)?; - let (i, _) = tag_no_case("CONNECT")(i)?; - let (i, _) = shouldbespace(i)?; - let (i, v) = value(i)?; - Ok((i, DefineScopeOption::Connect(v))) -} - // -------------------------------------------------- // -------------------------------------------------- // --------------------------------------------------