From e6fe7e675b275a95329d171463564cf7676de787 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Wed, 27 Apr 2022 02:29:32 +0100 Subject: [PATCH] Fix BEGIN / CANCEL / COMMIT full statements --- lib/src/sql/statements/begin.rs | 1 - lib/src/sql/statements/cancel.rs | 1 - lib/src/sql/statements/commit.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/lib/src/sql/statements/begin.rs b/lib/src/sql/statements/begin.rs index 008b5aa2..d85eabe0 100644 --- a/lib/src/sql/statements/begin.rs +++ b/lib/src/sql/statements/begin.rs @@ -28,7 +28,6 @@ fn begin_basic(i: &str) -> IResult<&str, BeginStatement> { fn begin_query(i: &str) -> IResult<&str, BeginStatement> { let (i, _) = tag_no_case("BEGIN")(i)?; - let (i, _) = shouldbespace(i)?; let (i, _) = opt(tuple((shouldbespace, tag_no_case("TRANSACTION"))))(i)?; Ok((i, BeginStatement)) } diff --git a/lib/src/sql/statements/cancel.rs b/lib/src/sql/statements/cancel.rs index 55202986..742f8111 100644 --- a/lib/src/sql/statements/cancel.rs +++ b/lib/src/sql/statements/cancel.rs @@ -28,7 +28,6 @@ fn cancel_basic(i: &str) -> IResult<&str, CancelStatement> { fn cancel_query(i: &str) -> IResult<&str, CancelStatement> { let (i, _) = tag_no_case("CANCEL")(i)?; - let (i, _) = shouldbespace(i)?; let (i, _) = opt(tuple((shouldbespace, tag_no_case("TRANSACTION"))))(i)?; Ok((i, CancelStatement)) } diff --git a/lib/src/sql/statements/commit.rs b/lib/src/sql/statements/commit.rs index e5ac9c0c..37d173ef 100644 --- a/lib/src/sql/statements/commit.rs +++ b/lib/src/sql/statements/commit.rs @@ -28,7 +28,6 @@ fn commit_basic(i: &str) -> IResult<&str, CommitStatement> { fn commit_query(i: &str) -> IResult<&str, CommitStatement> { let (i, _) = tag_no_case("COMMIT")(i)?; - let (i, _) = shouldbespace(i)?; let (i, _) = opt(tuple((shouldbespace, tag_no_case("TRANSACTION"))))(i)?; Ok((i, CommitStatement)) }