Skip to content

Commit

Permalink
updates parser that removes some constraints
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Calza <brunoangelicalza@gmail.com>
  • Loading branch information
brunocalza committed Aug 16, 2024
1 parent 15ff8d6 commit 5f7b02a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ require (
github.com/sethvargo/go-limiter v0.7.2
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.2
github.com/tablelandnetwork/sqlparser v0.0.0-20240529190608-e3776575020d
github.com/tablelandnetwork/sqlparser v0.0.0-20240816141915-b33ac93c827a
github.com/textileio/cli v1.0.2
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.37.0
go.opentelemetry.io/otel v1.14.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,8 @@ github.com/tablelandnetwork/sqlparser v0.0.0-20240523182602-af3edf08e3db h1:4/eO
github.com/tablelandnetwork/sqlparser v0.0.0-20240523182602-af3edf08e3db/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE=
github.com/tablelandnetwork/sqlparser v0.0.0-20240529190608-e3776575020d h1:Xhc6wudmyItX8Pvr+Z2SCzOmrf/zda5sX1jCgUySNRg=
github.com/tablelandnetwork/sqlparser v0.0.0-20240529190608-e3776575020d/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE=
github.com/tablelandnetwork/sqlparser v0.0.0-20240816141915-b33ac93c827a h1:Laz5yY58N2hUxDdVSejR3mIg0fGAjpD4JktMkgY6dDk=
github.com/tablelandnetwork/sqlparser v0.0.0-20240816141915-b33ac93c827a/go.mod h1:S+M/v3Q8X+236kQxMQziFcLId2Cscb1LzW06IUVhljE=
github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I=
github.com/textileio/cli v1.0.2 h1:qSp/x4d/9SZ93TxhgZnE5okRKqzqHqrzAwKAPjuPw50=
github.com/textileio/cli v1.0.2/go.mod h1:vTlCvvVyOmXXLwddCcBg3PDavfUsCkRBZoyr6Nu1lkc=
Expand Down
15 changes: 0 additions & 15 deletions pkg/parsing/impl/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,6 @@ func TestWriteQuery(t *testing.T) {
query: "update foo set a=1 from bar",
expErrType: ptr2ErrInvalidSyntax(),
},
{
name: "update where subquery",
query: "update foo set a=1 where a=(select a from bar limit 1) and b=1",
expErrType: ptr2ErrSubquery(),
},
{
name: "delete where subquery",
query: "delete from foo where a=(select a from bar limit 1)",
expErrType: ptr2ErrSubquery(),
},

// Disallow RETURNING clauses
{
Expand Down Expand Up @@ -994,11 +984,6 @@ func ptr2ErrKeywordIsNotAllowed() **sqlparser.ErrKeywordIsNotAllowed {
return &e
}

func ptr2ErrSubquery() **sqlparser.ErrStatementContainsSubquery {
var e *sqlparser.ErrStatementContainsSubquery
return &e
}

func ptr2ErrNoTopLevelCreate() **parsing.ErrNoTopLevelCreate {
var e *parsing.ErrNoTopLevelCreate
return &e
Expand Down

0 comments on commit 5f7b02a

Please sign in to comment.