MCPcopy Create free account
hub / github.com/bytebase/bytebase / Open

Method Open

backend/plugin/db/driver.go:140–140  ·  view source on GitHub ↗

General execution A driver might support multiple engines (e.g. MySQL driver can support both MySQL and TiDB), So we pass the dbType to tell the exact engine.

(ctx context.Context, dbType storepb.Engine, config ConnectionConfig)

Source from the content-addressed store, hash-verified

138 // A driver might support multiple engines (e.g. MySQL driver can support both MySQL and TiDB),
139 // So we pass the dbType to tell the exact engine.
140 Open(ctx context.Context, dbType storepb.Engine, config ConnectionConfig) (Driver, error)
141 // Remember to call Close to avoid connection leak
142 Close(ctx context.Context) error
143 Ping(ctx context.Context) error

Callers 15

TestCompletionFunction · 0.65
TestGetQuerySpanFromYAMLFunction · 0.65
TestGetQuerySpanFunction · 0.65
TestRestoreFunction · 0.65
TestGetStatementTypeFunction · 0.65
TestBackupFunction · 0.65
TestCompletionFunction · 0.65
TestGetQuerySpanFunction · 0.65
TestGetStatementRangeFunction · 0.65

Implementers 15

MockDriverbackend/plugin/advisor/utils_for_tests
Driverbackend/plugin/db/bigquery/bigquery.go
Driverbackend/plugin/db/mongodb/mongodb.go
Driverbackend/plugin/db/trino/trino.go
Driverbackend/plugin/db/redshift/redshift.go
Driverbackend/plugin/db/oracle/oracle.go
Driverbackend/plugin/db/dynamodb/dynamodb.go
Driverbackend/plugin/db/cosmosdb/cosmosdb.go
Driverbackend/plugin/db/spanner/spanner.go
Driverbackend/plugin/db/mssql/mssql.go
Driverbackend/plugin/db/mysql/mysql.go
Driverbackend/plugin/db/pg/pg.go

Calls

no outgoing calls

Tested by 15

TestCompletionFunction · 0.52
TestGetQuerySpanFromYAMLFunction · 0.52
TestGetQuerySpanFunction · 0.52
TestRestoreFunction · 0.52
TestGetStatementTypeFunction · 0.52
TestBackupFunction · 0.52
TestCompletionFunction · 0.52
TestGetQuerySpanFunction · 0.52
TestGetStatementRangeFunction · 0.52