Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

chore: upgrade gomongo and parser dependencies (BYT-9080) (#19700)

h3n4l2a5dba675693
diff --git a/backend/plugin/parser/cosmosdb/query_span_helpers.go b/backend/plugin/parser/cosmosdb/query_span_helpers.go
index 73934fe04c..439b28c6c3 100644
--- a/backend/plugin/parser/cosmosdb/query_span_helpers.go
+++ b/backend/plugin/parser/cosmosdb/query_span_helpers.go
@@ -11,11 +11,14 @@ import (
// extractFromNames returns the container name and from-clause alias.
func extractFromNames(fromClause parser.IFrom_clauseContext) (containerName, fromAlias string) {
- containerExpr := fromClause.From_specification().From_source().Container_expression()
- if i := containerExpr.Container_name().Identifier(); i != nil {
- containerName = i.GetText()
+ fromSource := fromClause.From_specification().From_source()
+ containerExpr := fromSource.Container_expression()
+ if containerExpr != nil && containerExpr.Container_name() != nil {
+ if i := containerExpr.Container_name().Identifier(); i != nil {
+ containerName = i.GetText()
+ }
}
- if i := containerExpr.Identifier(); i != nil {
+ if i := fromSource.Identifier(); i != nil {
fromAlias = i.GetText()
}
return containerName, fromAlias
diff --git a/go.mod b/go.mod
index 17eb8801cb..76f17de481 100644
--- a/go.mod
+++ b/go.mod
@@ -32,7 +32,7 @@ require (
github.com/beltran/gohive/v2 v2.0.0
github.com/blang/semver/v4 v4.0.0
github.com/bmatcuk/doublestar/v4 v4.10.0
- github.com/bytebase/gomongo v0.0.0-20260211083148-d2ea344b4b65
+ github.com/bytebase/gomongo v0.0.0-20260324061529-f15b9a5add35
github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0
github.com/bytebase/omni v0.0.0-20260323084215-7bbe88e0d0ed
github.com/caarlos0/env/v11 v11.4.0
@@ -298,7 +298,7 @@ require (
github.com/aws/aws-sdk-go-v2/service/sts v1.41.8
github.com/aws/smithy-go v1.24.2 // indirect
github.com/beorn7/perks v1.0.1 // indirect
- github.com/bytebase/parser v0.0.0-20260318084752-6c474df57697
+ github.com/bytebase/parser v0.0.0-20260324035613-3b4d6e704551
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cncf/xds/go v0.0.0-20251210132809-ee656c7534f5 // indirect
github.com/cockroachdb/cockroach-go/v2 v2.4.3
diff --git a/go.sum b/go.sum
index 87e75193d7..ee946f8e8b 100644
--- a/go.sum
+++ b/go.sum
@@ -249,14 +249,14 @@ github.com/bytebase/gh-ost2 v1.1.7-0.20251002210738-35e5dddaad7c h1:scJ4ycKuUAaA
github.com/bytebase/gh-ost2 v1.1.7-0.20251002210738-35e5dddaad7c/go.mod h1:X0CGYwIZUnjfrv02/nBlftxqSBMm4mYJzFwiyn2D4d8=
github.com/bytebase/go-mssqldb v0.0.0-20240801091126-3ff3ca07d898 h1:0ggqA9XL4yvtePPvRDRYMed3jtdNk4s0o8AMW8uJPSA=
github.com/bytebase/go-mssqldb v0.0.0-20240801091126-3ff3ca07d898/go.mod h1:2KhUz4GSLcdJGXSJMXAf2BjmakcgoOkNyPpHdGAxRpY=
-github.com/bytebase/gomongo v0.0.0-20260211083148-d2ea344b4b65 h1:RvViQx0e24DeDJ0iENOl2wP9q7bVbFFaIyOo0whZCK4=
-github.com/bytebase/gomongo v0.0.0-20260211083148-d2ea344b4b65/go.mod h1:4dDI0RO2BK9/BD4VE+YqvlCj/qoVMquZ99QZdRlT8Wg=
+github.com/bytebase/gomongo v0.0.0-20260324061529-f15b9a5add35 h1:SjcZSrUMNj6GZq4QxBuG8K72I64BiwYwLkEBEsARFtg=
+github.com/bytebase/gomongo v0.0.0-20260324061529-f15b9a5add35/go.mod h1:jHdAD+tN3bO2Hazme0crgkNiHqkDR/3Igesy1chhjLA=
github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0 h1:bJ8NSf2K+pccl5m/wuu97fiYjDwpJH6IzURAq/3XA2U=
github.com/bytebase/lsp-protocol v0.0.0-20250324071136-1586d0c10ff0/go.mod h1:BEWMfiZtqshdmulKJcIsWb45MUaEvDO4CROcgi8dfFg=
github.com/bytebase/omni v0.0.0-20260323084215-7bbe88e0d0ed h1:vJ//BI7+pFRujbQTKBVAcZtAwoLSrWKjMVXITo6P97c=
github.com/bytebase/omni v0.0.0-20260323084215-7bbe88e0d0ed/go.mod h1:btZOCeNcueZehdqT+7YsLSVm+srVGSoPZYvFlITO2Z8=
-github.com/bytebase/parser v0.0.0-20260318084752-6c474df57697 h1:/WgqQxX/gLsHS1WOx1rs5M/8kE9ecQAsgnQmlSr7p3c=
-github.com/bytebase/parser v0.0.0-20260318084752-6c474df57697/go.mod h1:jeak/EfutSOAuWKvrFIT2IZunhWprM7oTFBRgZ9RCxo=
+github.com/bytebase/parser v0.0.0-20260324035613-3b4d6e704551 h1:jmOIMyIEXoMWZ+TK91STbBMPRom7S/tWxosxYZDg9jk=
+github.com/bytebase/parser v0.0.0-20260324035613-3b4d6e704551/go.mod h1:jeak/EfutSOAuWKvrFIT2IZunhWprM7oTFBRgZ9RCxo=
github.com/bytebase/pgx/v5 v5.0.0-20250212161523-96ff8aed8767 h1:YuR5G3LcxpO5ScSTA+Kdirxg9RW4TRc/v1t7N2Hfmbw=
github.com/bytebase/pgx/v5 v5.0.0-20250212161523-96ff8aed8767/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ=
github.com/bytebase/pkcs8 v0.0.0-20240612095628-fcd0a7484c94 h1:6PNsuNmSqCuR8Z616uQLzDIvujWCFsKzeVc3ECmVubk=