Skip to content

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

chore: trino MVP (#15765)

Vincent Huange2534b1d76e9
diff --git a/backend/api/v1/common.go b/backend/api/v1/common.go
index 717a98ee4c..1b323d575a 100644
--- a/backend/api/v1/common.go
+++ b/backend/api/v1/common.go
@@ -309,6 +309,8 @@ func convertToEngine(engine storepb.Engine) v1pb.Engine {
return v1pb.Engine_COSMOSDB
case storepb.Engine_CASSANDRA:
return v1pb.Engine_CASSANDRA
+ case storepb.Engine_TRINO:
+ return v1pb.Engine_TRINO
}
return v1pb.Engine_ENGINE_UNSPECIFIED
}
@@ -369,6 +371,8 @@ func convertEngine(engine v1pb.Engine) storepb.Engine {
return storepb.Engine_COSMOSDB
case v1pb.Engine_CASSANDRA:
return storepb.Engine_CASSANDRA
+ case v1pb.Engine_TRINO:
+ return storepb.Engine_TRINO
}
return storepb.Engine_ENGINE_UNSPECIFIED
}
diff --git a/backend/plugin/db/trino/dump.go b/backend/plugin/db/trino/dump.go
new file mode 100644
index 0000000000..1497f51c44
--- /dev/null
+++ b/backend/plugin/db/trino/dump.go
@@ -0,0 +1,14 @@
+package trino
+
+import (
+ "context"
+ "io"
+
+ storepb "github.com/bytebase/bytebase/proto/generated-go/store"
+)
+
+// Dump dumps the database.
+// func (*Driver) Dump(_ context.Context, out io.Writer, dbSchema *storepb.DatabaseSchemaMetadata) error {
+func (*Driver) Dump(_ context.Context, _ io.Writer, _ *storepb.DatabaseSchemaMetadata) error {
+ return nil
+}
diff --git a/backend/plugin/db/trino/sync.go b/backend/plugin/db/trino/sync.go
new file mode 100644
index 0000000000..ae74702f37
--- /dev/null
+++ b/backend/plugin/db/trino/sync.go
@@ -0,0 +1,97 @@
+package trino
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/pkg/errors"
+
+ "github.com/bytebase/bytebase/backend/plugin/db"
+
+ storepb "github.com/bytebase/bytebase/proto/generated-go/store"
+)
+
+func (d *Driver) SyncInstance(ctx context.Context) (*db.InstanceMetadata, error) {
+ version, err := d.getVersion(ctx)
+ if err != nil {
+ return nil, errors.Wrapf(err, "failed to get version")
+ }
+
+ var databases []*storepb.DatabaseSchemaMetadata
+
+ catalogRows, err := d.db.QueryContext(ctx, "SHOW CATALOGS")
+ if err != nil {
+ return nil, err
+ }
+ defer catalogRows.Close()
+
+ for catalogRows.Next() {
+ var catalog string
+ if err := catalogRows.Scan(&catalog); err != nil {
+ return nil, err
+ }
+
+ database := &storepb.DatabaseSchemaMetadata{
+ Name: catalog,
+ }
+
+ schemaQuery := fmt.Sprintf("SHOW SCHEMAS FROM %s", catalog)
+ // Use an IIFE (Immediately Invoked Function Expression) to encapsulate the schema query
+ // This lets us use defer for the rows while avoiding the "defer in loop" issue
+ schemas, err := func() ([]*storepb.SchemaMetadata, error) {
+ schemaRows, err := d.db.QueryContext(ctx, schemaQuery)
+ if err != nil {
+ return nil, err
+ }
+ defer schemaRows.Close()
+ var schemas []*storepb.SchemaMetadata
+ for schemaRows.Next() {
+ var schemaName string
+ if err := schemaRows.Scan(&schemaName); err != nil {
+ return nil, err
+ }
+ schemas = append(schemas, &storepb.SchemaMetadata{
+ Name: schemaName,
+ })
+ }
+ // Check for errors from iterating over rows
+ if err := schemaRows.Err(); err != nil {
+ return nil, err
+ }
+
+ return schemas, nil
+ }()
+
+ if err != nil {
+ // skip catalog if schemas can't be retrieved
+ continue
+ }
+
+ database.Schemas = schemas
+ databases = append(databases, database)
+ }
+
+ // Check for errors from iterating over catalog rows
+ if err := catalogRows.Err(); err != nil {
+ return nil, err
+ }
+
+ return &db.InstanceMetadata{
+ Version: version,
+ Databases: databases,
+ }, nil
+}
+
+// func (d *Driver) SyncDBSchema(ctx context.Context) (*storepb.DatabaseSchemaMetadata, error) {
+func (*Driver) SyncDBSchema(_ context.Context) (*storepb.DatabaseSchemaMetadata, error) {
+ return nil, nil
+}
+
+func (d *Driver) getVersion(ctx context.Context) (string, error) {
+ var version string
+ query := "SELECT VERSION()"
+ if err := d.db.QueryRowContext(ctx, query).Scan(&version); err != nil {
+ return "", errors.Wrapf(err, "failed to query")
+ }
+ return version, nil
+}
diff --git a/backend/plugin/db/trino/trino.go b/backend/plugin/db/trino/trino.go
index 79272be8b7..1f221c53c0 100644
--- a/backend/plugin/db/trino/trino.go
+++ b/backend/plugin/db/trino/trino.go
@@ -1 +1,113 @@
package trino
+
+import (
+ "context"
+ "database/sql"
+ "fmt"
+ "net/url"
+
+ "github.com/pkg/errors"
+ // Import the Trino driver to register it with database/sql
+ _ "github.com/trinodb/trino-go-client/trino"
+
+ "github.com/bytebase/bytebase/backend/plugin/db"
+ storepb "github.com/bytebase/bytebase/proto/generated-go/store"
+ v1pb "github.com/bytebase/bytebase/proto/generated-go/v1"
+)
+
+func init() {
+ db.Register(storepb.Engine_TRINO, newDriver)
+}
+
+type Driver struct {
+ config db.ConnectionConfig
+ db *sql.DB
+}
+
+func newDriver(db.DriverConfig) db.Driver {
+ return &Driver{}
+}
+
+func (*Driver) Open(_ context.Context, _ storepb.Engine, config db.ConnectionConfig) (db.Driver, error) {
+ // Construct Trino DSN
+ var scheme string
+ if config.DataSource.UseSsl {
+ scheme = "https"
+ } else {
+ scheme = "http"
+ }
+
+ // Build query parameters
+ queryParams := url.Values{}
+ // Add catalog if specified in config
+ if config.DataSource.Database != "" {
+ queryParams.Add("catalog", config.DataSource.Database)
+ }
+
+ // Add user and password
+ user := config.DataSource.Username
+ if user == "" {
+ user = "trino" // default user if not specified
+ }
+
+ password := config.Password
+ if password == "" {
+ password = config.DataSource.Password // try to get from DataSource if not provided directly
+ }
+
+ host := config.DataSource.Host
+ port := config.DataSource.Port
+ if port == "" {
+ port = "8080" // default Trino port
+ }
+
+ // Construct DSN string with user and password if provided
+ var dsn string
+ if password != "" {
+ dsn = fmt.Sprintf("%s://%s:%s@%s:%s", scheme, user, url.QueryEscape(password), host, port)
+ } else {
+ dsn = fmt.Sprintf("%s://%s@%s:%s", scheme, user, host, port)
+ }
+ if len(queryParams) > 0 {
+ dsn = dsn + "?" + queryParams.Encode()
+ }
+
+ // Open connection
+ db, err := sql.Open("trino", dsn)
+ if err != nil {
+ return nil, errors.Wrap(err, "failed to connect to Trino")
+ }
+
+ return &Driver{
+ config: config,
+ db: db,
+ }, nil
+}
+
+func (d *Driver) Close(context.Context) error {
+ if d.db != nil {
+ return d.db.Close()
+ }
+ return nil
+}
+
+func (d *Driver) Ping(ctx context.Context) error {
+ if d.db != nil {
+ return d.db.PingContext(ctx)
+ }
+ return errors.New("database connection not established")
+}
+
+func (d *Driver) GetDB() *sql.DB {
+ return d.db
+}
+
+// func (*Driver) Execute(ctx context.Context, statement string, opts db.ExecuteOptions) (int64, error) {
+func (*Driver) Execute(_ context.Context, _ string, _ db.ExecuteOptions) (int64, error) {
+ return 0, errors.New("tbd")
+}
+
+// func (*Driver) QueryConn(ctx context.Context, conn *sql.Conn, statement string, queryContext db.QueryContext) ([]*v1pb.QueryResult, error) {
+func (*Driver) QueryConn(_ context.Context, _ *sql.Conn, _ string, _ db.QueryContext) ([]*v1pb.QueryResult, error) {
+ return nil, errors.New("tbd")
+}
diff --git a/backend/server/ultimate.go b/backend/server/ultimate.go
index 254d53f087..653d8abbd3 100644
--- a/backend/server/ultimate.go
+++ b/backend/server/ultimate.go
@@ -26,6 +26,7 @@ import (
_ "github.com/bytebase/bytebase/backend/plugin/db/sqlite"
_ "github.com/bytebase/bytebase/backend/plugin/db/starrocks"
_ "github.com/bytebase/bytebase/backend/plugin/db/tidb"
+ _ "github.com/bytebase/bytebase/backend/plugin/db/trino"
// Parsers.
_ "github.com/bytebase/bytebase/backend/plugin/parser/bigquery"
diff --git a/frontend/src/assets/db/trino.svg b/frontend/src/assets/db/trino.svg
new file mode 100644
index 0000000000..40cdce24a3
--- /dev/null
+++ b/frontend/src/assets/db/trino.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 134.21 63.19"><defs><style>.cls-1{fill:#cdcccc;}.cls-2{fill:#fff;}.cls-3{fill:#dd00a1;}.cls-4{fill:#f9d8d2;}.cls-5{fill:#10110e;}.cls-6{fill:#e5e5e5;}.cls-7{fill:#8accce;opacity:0.2;}.cls-8{fill:#515151;}</style></defs><g id="Layer_2" data-name="Layer 2"><g id="Layer_3" data-name="Layer 3"><path class="cls-1" d="M39.09,30.67a3,3,0,0,0-6,0A2.76,2.76,0,0,0,35,33.22v4.57a15.27,15.27,0,0,0-6.91-7.85c.46-1,.93-1.86,1.38-2.65a65.83,65.83,0,0,1,5.67-7.24c1.13-1.34,2.2-2.6,3.07-3.7,2.44-3.06,5.12-7.58,4.62-10.26a2.56,2.56,0,0,0-1.25-1.81c-3.39-2-8,4.5-12.53,10.77-3,4.14-4.55,10-5.26,13.29a19.86,19.86,0,0,0-4.23-.46,18.63,18.63,0,0,0-6.08,1,85.14,85.14,0,0,1,.33-11c1-9.51.56-15.09-1.29-17A2.43,2.43,0,0,0,10.56,0C5.1.27,5.72,16.58,5.81,18.44c.22,4.46,2,9.88,3.08,12.88a15.44,15.44,0,0,0-5.25,7.81H3.25a3.11,3.11,0,0,0-3.25,3v5.17a3.12,3.12,0,0,0,3.25,3h.66A13.34,13.34,0,0,0,7.2,54.93l-1,.88a1.17,1.17,0,0,0-.13,1.64c3,3.65,7.91,5.74,13.42,5.74s10.44-2.09,13.42-5.74a1.17,1.17,0,0,0-.13-1.64l-1-.88a13.56,13.56,0,0,0,3.29-4.71h.75a3.12,3.12,0,0,0,3.25-3V42.09a2.94,2.94,0,0,0-1.91-2.68V33.22A2.75,2.75,0,0,0,39.09,30.67Z"/><path class="cls-2" d="M14.62,55.74c.92-.61-1.5-.38-1.7-.79a16.49,16.49,0,0,1-2.86-.51c-1.7-.45-5.78-3.19-6.22-5.82S3.84,41,5.68,38a17.21,17.21,0,0,1,4.38-4.7s-3.57-8.49-3.87-14.9S6.39.58,10.57.38s3.57,10.48,2.86,17.43a90.59,90.59,0,0,0-.2,13.88,19.73,19.73,0,0,1,5.5-.92,21.12,21.12,0,0,1,4.9.46s1.33-9.84,5.71-16,9-12.45,12-10.66-.82,8.18-3.47,11.51-7.24,8.33-8.77,11a46.59,46.59,0,0,0-2.65,5.51,14.93,14.93,0,0,1,6.39,6.32C35,43.22,35.16,48.52,34,50.77a8.08,8.08,0,0,1-5.61,4c-1.33.06-6.92,1.45-6.92,1.45Z"/><path class="cls-3" d="M24.41,31.32s3.34-8.71,6.33-13.6,7-8.59,8.26-7.84-2.57,5.32-5.93,9.81a113.44,113.44,0,0,0-7.43,12.38Z"/><path class="cls-3" d="M11,32.81l1-.74s-.14-8.71,0-14,.41-11.9-1.36-11.84-3,5.17-2.31,12.38A87.47,87.47,0,0,0,11,32.81Z"/><circle class="cls-4" cx="8.02" cy="49.54" r="1.94"/><circle class="cls-4" cx="30.95" cy="49.54" r="1.94"/><path class="cls-5" d="M22.7,49.38a.18.18,0,0,0-.25.07s-.58,1-1.42,1.06a2.09,2.09,0,0,1-1.5-.7V48.33c.54-.3,1.41-1.2,1.41-1.51a1.41,1.41,0,0,0-1.49-1.09c-1,0-1.7.65-1.7,1.19s1.1,1.24,1.41,1.44v1.46a1.82,1.82,0,0,1-1.31.69c-.79,0-1.39-1.08-1.4-1.09a.19.19,0,0,0-.25-.08.2.2,0,0,0-.08.26s.71,1.29,1.73,1.29a2.12,2.12,0,0,0,1.51-.73,2.37,2.37,0,0,0,1.58.73h.12a2.49,2.49,0,0,0,1.71-1.26A.18.18,0,0,0,22.7,49.38Z"/><path class="cls-6" d="M10.06,33.32s-2.77-7-3.3-10.66-1-9.77-.3-13.84A50,50,0,0,1,7.68,3.26S6.39,12.75,6.87,16.9,10.06,33.32,10.06,33.32Z"/><path class="cls-6" d="M23.63,31.23s2-10.59,4.91-14.75S35.06,7.27,36.89,6l1.83-1.28s-7.34,7.7-10.18,14S23.63,31.23,23.63,31.23Z"/><path class="cls-5" d="M12,43.23a1.52,1.52,0,1,0,1.51,1.52A1.52,1.52,0,0,0,12,43.23Zm.43,1.41a.41.41,0,0,1-.41-.41.41.41,0,0,1,.82,0A.41.41,0,0,1,12.41,44.64Z"/><path class="cls-5" d="M26.92,43.23a1.52,1.52,0,1,0,1.52,1.52A1.52,1.52,0,0,0,26.92,43.23Zm.43,1.41a.42.42,0,0,1-.41-.41.42.42,0,0,1,.83,0A.42.42,0,0,1,27.35,44.64Z"/><ellipse class="cls-7" cx="19.73" cy="45.32" rx="14.1" ry="10.16"/><path class="cls-2" d="M36.8,39.67V33a2.45,2.45,0,0,0,1.92-2.28,2.65,2.65,0,0,0-5.27,0A2.44,2.44,0,0,0,35.36,33V39.5h-.19c-2-6.94-7.91-11.25-15.62-11.25S5.89,32.52,3.92,39.5H3.25A2.75,2.75,0,0,0,.37,42.09v5.17a2.75,2.75,0,0,0,2.88,2.58h.91a13.11,13.11,0,0,0,3.6,5.09l-1.3,1.16a.79.79,0,0,0-.09,1.12c2.92,3.53,7.71,5.6,13.13,5.6s10.21-2,13.13-5.6a.79.79,0,0,0-.09-1.12l-1.3-1.16a13.34,13.34,0,0,0,3.6-5.09h1a2.75,2.75,0,0,0,2.88-2.58V42.09A2.62,2.62,0,0,0,36.8,39.67ZM19.55,35.62c7.14,0,12.94,4.7,12.94,10.47,0,6.25-6.52,9-12.94,9s-12.94-2.8-12.94-9C6.61,40.32,12.41,35.62,19.55,35.62Z"/><path class="cls-8" d="M37.28,45.53H35.36c0-.3,0-.6,0-.94a19.35,19.35,0,0,0-.38-3.8h.81a1.35,1.35,0,0,1,1.44,1.3Z"/><path class="cls-8" d="M35.84,48.55h-1a16.69,16.69,0,0,0,.43-2.15h2v.86A1.34,1.34,0,0,1,35.84,48.55Z"/><path class="cls-8" d="M19.55,61.48c-4.8,0-9.06-1.73-11.75-4.79l1.35-1.2a17.86,17.86,0,0,0,10.4,3,17.89,17.89,0,0,0,10.4-3l1.34,1.2C28.61,59.75,24.34,61.48,19.55,61.48Z"/><path class="cls-8" d="M3.25,40.79h.86a19.66,19.66,0,0,0-.38,3.8,6.18,6.18,0,0,0,0,.94H1.86V42.09A1.28,1.28,0,0,1,3.25,40.79Z"/><path d="M19.55,34.76a17.4,17.4,0,0,0-4.8.69V30.24a17.14,17.14,0,0,1,4.8-.65,17.12,17.12,0,0,1,4.79.65v5.25A16,16,0,0,0,19.55,34.76Z"/><path class="cls-8" d="M13.8,30.54V35.8C9,37.56,5.65,41.53,5.65,46.09,5.65,52,11.26,56,19.55,56s13.9-4,13.9-9.91c0-4.56-3.36-8.53-8.15-10.29V30.54c5.61,2,9.11,7.19,9.11,14.09,0,7.76-5.95,13-14.86,13s-14.86-5.21-14.86-13C4.69,37.73,8.19,32.56,13.8,30.54Z"/><path class="cls-8" d="M1.81,46.4h2a15.15,15.15,0,0,0,.43,2.15h-1a1.35,1.35,0,0,1-1.44-1.29Z"/><ellipse class="cls-8" cx="36.08" cy="30.67" rx="1.2" ry="1.08"/><path d="M63.74,36.78H57.92v-5.3a1.4,1.4,0,0,0-1.4-1.4h-.05a1.4,1.4,0,0,0-1.4,1.4v5.3h-1.7A1.36,1.36,0,0,0,52,38.14v0a1.36,1.36,0,0,0,1.36,1.36h1.7V52.19a6.51,6.51,0,0,0,1.55,4.61,5.81,5.81,0,0,0,4.45,1.7,8.11,8.11,0,0,0,3.4-.73,1,1,0,0,0,.54-.89V56a1,1,0,0,0-1.45-.89,5.53,5.53,0,0,1-2.49.59,2.93,2.93,0,0,1-2.36-.85,4.19,4.19,0,0,1-.79-2.76V39.52h5.82a1.34,1.34,0,0,0,1.35-1.35v0A1.34,1.34,0,0,0,63.74,36.78Z"/><path d="M78.29,36.32A8.23,8.23,0,0,0,75,37a9.19,9.19,0,0,0-2.6,1.72,9.91,9.91,0,0,0-1,1.12V38.19a1.41,1.41,0,0,0-1.41-1.41h0a1.41,1.41,0,0,0-1.41,1.41V56.74a1.41,1.41,0,0,0,1.41,1.41h0a1.41,1.41,0,0,0,1.41-1.41V47.12a8.36,8.36,0,0,1,.49-2.66,9.61,9.61,0,0,1,1.4-2.65,8.06,8.06,0,0,1,2.17-2,5,5,0,0,1,2.73-.74h.19a1,1,0,0,0,1-1v-.77A1,1,0,0,0,78.29,36.32Z"/><path d="M84.11,36.78h0a1.42,1.42,0,0,0-1.42,1.42V56.76a1.39,1.39,0,0,0,1.38,1.39h.08a1.39,1.39,0,0,0,1.39-1.39V38.2A1.43,1.43,0,0,0,84.11,36.78Z"/><path d="M106.3,39.1A7.84,7.84,0,0,0,103.41,37a9.82,9.82,0,0,0-3.87-.72,8.82,8.82,0,0,0-3.46.64,9,9,0,0,0-2.58,1.61,8.15,8.15,0,0,0-.72.72v-1.1a1.41,1.41,0,0,0-1.41-1.41h0a1.41,1.41,0,0,0-1.41,1.41V56.75a1.4,1.4,0,0,0,1.4,1.4h.06a1.4,1.4,0,0,0,1.4-1.4V46.42a7.85,7.85,0,0,1,.52-2.89,7.44,7.44,0,0,1,1.45-2.34,6.55,6.55,0,0,1,2.11-1.55,6.15,6.15,0,0,1,2.58-.55,7.07,7.07,0,0,1,2.8.52,5.52,5.52,0,0,1,2,1.4,6,6,0,0,1,1.18,2.22,10.27,10.27,0,0,1,.42,3V56.77a1.38,1.38,0,0,0,1.38,1.38h.1a1.37,1.37,0,0,0,1.37-1.38V46.19a12.33,12.33,0,0,0-.59-4A8.87,8.87,0,0,0,106.3,39.1Z"/><path d="M133.43,43.17a10.63,10.63,0,0,0-2.27-3.55,11.5,11.5,0,0,0-12.57-2.38,10.74,10.74,0,0,0-5.73,6,11.68,11.68,0,0,0-.78,4.29,11.53,11.53,0,0,0,.78,4.24,10.75,10.75,0,0,0,2.27,3.53,11,11,0,0,0,8,3.3,11.2,11.2,0,0,0,4.55-.9,10.62,10.62,0,0,0,3.5-2.43,11,11,0,0,0,2.24-3.56,11.81,11.81,0,0,0,.78-4.33A11.61,11.61,0,0,0,133.43,43.17ZM123.18,55.84a8.15,8.15,0,0,1-3.33-.66,7.94,7.94,0,0,1-2.61-1.79,8,8,0,0,1-1.71-2.66,8.81,8.81,0,0,1-.6-3.3,9.05,9.05,0,0,1,.59-3.25,8.11,8.11,0,0,1,1.67-2.65,7.9,7.9,0,0,1,2.58-1.79,8.79,8.79,0,0,1,6.66,0,7.88,7.88,0,0,1,2.62,1.79,8.27,8.27,0,0,1,1.71,2.65,9.31,9.31,0,0,1,0,6.55,8,8,0,0,1-1.67,2.66,7.94,7.94,0,0,1-2.58,1.78A8.16,8.16,0,0,1,123.18,55.84Z"/><circle cx="84.13" cy="32.24" r="1.62"/></g></g></svg>
\ No newline at end of file
diff --git a/frontend/src/components/InstanceForm/constants.ts b/frontend/src/components/InstanceForm/constants.ts
index ea1c1dcb86..c0605f8d89 100644
--- a/frontend/src/components/InstanceForm/constants.ts
+++ b/frontend/src/components/InstanceForm/constants.ts
@@ -58,7 +58,9 @@ export const defaultPortForEngine = (engine: Engine) => {
return "";
case Engine.CASSANDRA:
return "9042";
- }
+ case Engine.TRINO:
+ return "8080";
+ }
throw new Error("engine port unknown");
};
@@ -108,6 +110,7 @@ export const EngineIconPath: Record<string, string> = {
.href,
[Engine.COSMOSDB]: new URL("@/assets/db/cosmosdb.svg", import.meta.url).href,
[Engine.CASSANDRA]: new URL("@/assets/db/cassandra.svg", import.meta.url).href,
+ [Engine.TRINO]: new URL("@/assets/db/trino.svg", import.meta.url).href,
};
export const MongoDBConnectionStringSchemaList = [
diff --git a/frontend/src/utils/v1/instance.ts b/frontend/src/utils/v1/instance.ts
index 54dbe94cd8..184d9a3a56 100644
--- a/frontend/src/utils/v1/instance.ts
+++ b/frontend/src/utils/v1/instance.ts
@@ -101,6 +101,7 @@ export const supportedEngineV1List = () => {
Engine.COCKROACHDB,
Engine.COSMOSDB,
Engine.CASSANDRA,
+ Engine.TRINO,
];
if (locale.value === "zh-CN") {
engines.push(Engine.DM);
@@ -392,6 +393,8 @@ export const engineNameV1 = (type: Engine): string => {
return "CosmosDB";
case Engine.CASSANDRA:
return "Cassandra"
+ case Engine.TRINO:
+ return "Trino";
}
return "";
};
diff --git a/go.mod b/go.mod
index 17c7391d1d..a8ce59d22d 100644
--- a/go.mod
+++ b/go.mod
@@ -88,6 +88,7 @@ require (
github.com/stretchr/testify v1.10.0
github.com/testcontainers/testcontainers-go v0.36.0
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75
+ github.com/trinodb/trino-go-client v0.323.0
github.com/vjeantet/ldapserver v1.0.1
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8
github.com/xuri/excelize/v2 v2.9.0
@@ -121,7 +122,7 @@ require (
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
github.com/Azure/azure-sdk-for-go/sdk/internal v1.10.0 // indirect
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 // indirect
- github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
+ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 // indirect
github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
diff --git a/go.sum b/go.sum
index d9e5c0eac0..1f2adbb68a 100644
--- a/go.sum
+++ b/go.sum
@@ -655,8 +655,8 @@ github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v1.0.0/go.mod h
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0 h1:UXT0o77lXQrikd1kgwIPQOUect7EoR/+sbP4wQKdzxM=
github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.6.0/go.mod h1:cTvi54pg19DoT07ekoeMgE/taAwNtCShVeZqA+Iv2xI=
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8=
-github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
-github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
+github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0=
+github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358 h1:mFRzDkZVAjdal+s7s0MwaRv9igoPqLRdzOLzw/8Xvq8=
github.com/Azure/go-ntlmssp v0.0.0-20221128193559-754e69321358/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU=
github.com/AzureAD/microsoft-authentication-extensions-for-go/cache v0.1.1 h1:WJTmL004Abzc5wDB5VtZG2PJk5ndYDgVacGqfirKxjM=
@@ -700,6 +700,7 @@ github.com/Masterminds/sprig v2.22.0+incompatible/go.mod h1:y6hNFY5UBTIWBxnzTeuN
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=
github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU=
+github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw=
github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5/go.mod h1:lmUJ/7eu/Q8D7ML55dXQrVaamCz2vxCfdQBasLZfHKk=
github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
@@ -709,6 +710,8 @@ github.com/TomiHiltunen/geohash-golang v0.0.0-20150112065804-b3e4e625abfb h1:wum
github.com/TomiHiltunen/geohash-golang v0.0.0-20150112065804-b3e4e625abfb/go.mod h1:QiYsIBRQEO+Z4Rz7GoI+dsHVneZNONvhczuA+llOZNM=
github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g=
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
+github.com/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26 h1:3YVZUqkoev4mL+aCwVOSWV4M7pN+NURHL38Z2zq5JKA=
+github.com/ahmetb/dlog v0.0.0-20170105205344-4fb5f8204f26/go.mod h1:ymXt5bw5uSNu4jveerFxE0vNYxF8ncqbptntMaFMg3k=
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
@@ -928,6 +931,8 @@ github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk
github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI=
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
github.com/containerd/continuity v0.0.0-20190827140505-75bee3e2ccb6/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y=
+github.com/containerd/continuity v0.4.3 h1:6HVkalIp+2u1ZLH1J/pYX2oBVXlJZvh1X1A7bEZ9Su8=
+github.com/containerd/continuity v0.4.3/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ=
github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I=
github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo=
github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A=
@@ -988,6 +993,8 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
+github.com/docker/cli v26.1.4+incompatible h1:I8PHdc0MtxEADqYJZvhBrW9bo8gawKwwenxRM7/rLu8=
+github.com/docker/cli v26.1.4+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/docker v28.0.1+incompatible h1:FCHjSRdXhNRFjlHMTv4jUNlIBbTeRjrWfeFuJp7jpo0=
github.com/docker/docker v28.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
@@ -1729,6 +1736,8 @@ github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zM
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
+github.com/opencontainers/runc v1.1.13 h1:98S2srgG9vw0zWcDpFMn5TRrh8kLxa/5OFUstuUhmRs=
+github.com/opencontainers/runc v1.1.13/go.mod h1:R016aXacfp/gwQBYw2FDGa9m+n6atbLWrYY8hNMT/sA=
github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
github.com/opentracing/basictracer-go v1.1.0 h1:Oa1fTSBvAl8pa3U+IJYqrKm0NALwH9OsgwOqDv4xJW0=
@@ -1742,6 +1751,8 @@ github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJ
github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
github.com/ory/dockertest/v3 v3.6.0/go.mod h1:4ZOpj8qBUmh8fcBSVzkH2bws2s91JdGvHUqan4GHEuQ=
+github.com/ory/dockertest/v3 v3.11.0 h1:OiHcxKAvSDUwsEVh2BjxQQc/5EHz9n0va9awCtNGuyA=
+github.com/ory/dockertest/v3 v3.11.0/go.mod h1:VIPxS1gwT9NpPOrfD3rACs8Y9Z7yhzO4SB194iUDnUI=
github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/paulmach/orb v0.11.1 h1:3koVegMC4X/WeiXYz9iswopaTwMem53NzTJuTF20JzU=
@@ -1995,6 +2006,8 @@ github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9f
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75 h1:6fotK7otjonDflCTK0BCfls4SPy3NcCVb5dqqmbRknE=
github.com/tmc/grpc-websocket-proxy v0.0.0-20220101234140-673ab2c3ae75/go.mod h1:KO6IkyS8Y3j8OdNO85qEYBsRPuteD+YciPomcXdrMnk=
+github.com/trinodb/trino-go-client v0.323.0 h1:I7Y67um1NnrwKCThzGr8o0xYUldb+n4vPn5R/qUxW2E=
+github.com/trinodb/trino-go-client v0.323.0/go.mod h1:F+7TZRD0+0M8XqYsgXT8+EJT1pSlbxTECVD1BDzCc70=
github.com/twmb/murmur3 v1.1.6 h1:mqrRot1BRxm+Yct+vavLMou2/iJt0tNVTTC0QoIjaZg=
github.com/twmb/murmur3 v1.1.6/go.mod h1:Qq/R7NUyOfr65zD+6Q5IHKsJLwP7exErjN6lyyq3OSQ=
github.com/twpayne/go-geom v1.4.1 h1:LeivFqaGBRfyg0XJJ9pkudcptwhSSrYN9KZUW6HcgdA=
@@ -2037,7 +2050,11 @@ github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgk
github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8=
github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
+github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
+github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
+github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
+github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo=
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos=