cfg *config.SQL,
resolver resolver.ServiceResolver,
db, err := createConnection(dbKind, cfg, resolver)
if err != nil {
return nil, err
}
}
Frontier kind: Code frontier
unlabeled · c_09dc86b8cb08
470 tests · 2377 LOC · 114 files · introduces 0 tests · 66 LOC · 4 files
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
go.temporal.io/server/common/persistence/client/TestQuotasSuite/TestAPITypeCallOriginPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestBackgroundTypeAPIPriorityOverrideMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestCallerTypeDefaultPriorityMappinggo.temporal.io/server/common/persistence/client/TestQuotasSuite/TestRequestPrioritiesOrderedgo.temporal.io/server/common/circuitbreaker/TestTSCBWithDynamicSettingsgo.temporal.io/server/common/dynamicconfig/TestDeepCopy_OtherReferenceTypes_Nilgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIPrioritiesOrderedgo.temporal.io/server/service/matching/configs/TestQuotasSuite/TestAPIToPriorityMappingEvery collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
4 files ranked by introduced lines: 66 introduced LOC across 23 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
cfg *config.SQL,
resolver resolver.ServiceResolver,
db, err := createConnection(dbKind, cfg, resolver)
if err != nil {
return nil, err
}
}
cfg *config.SQL,
resolver resolver.ServiceResolver,
err := registerTLSConfig(cfg)
if err != nil {
return nil, err
}
if cfg.PasswordCommand != nil {
c := sqlplugin.NewRefreshingConnector(
func() (string, error) {
return nil, err
}
var dsn string
dsn, err = buildDSN(dbKind, cfg, resolver)
if err != nil {
return nil, err
}
if err != nil {
return nil, err
}
}
db.SetMaxOpenConns(cfg.MaxConns)
}
db.SetMaxIdleConns(cfg.MaxIdleConns)
}
db.SetConnMaxLifetime(cfg.MaxConnLifetime)
}
// Maps struct names in CamelCase to snake without need for db struct tags.
return db, nil
}
}
if cfg.TLS == nil || !cfg.TLS.Enabled {
return nil
}
// TODO: create a way to set MinVersion and CipherSuites via cfg.
var _ sqlplugin.Tx = (*db)(nil)
myErr, ok := err.(*mysql.MySQLError)
if !ok {
return false
}
return myErr.Number == readOnlyModeCode || myErr.Number == readOnlyTransactionCode || myErr.Number == tooManyConnectionsCode
}
tx *sqlx.Tx,
logger log.Logger,
mdb := &db{
dbKind: dbKind,
dbName: dbName,
handle: handle,
tx: tx,
logger: logger,
}
mdb.converter = &converter{}
return mdb
}
func (mdb *db) conn() sqlplugin.Conn {
// Close closes the connection to the mysql db
mdb.handle.Close()
return nil
}
// PluginName returns the name of the mysql plugin
// CreateDatabase creates a database if it doesn't exist
return mdb.Exec(fmt.Sprintf(createDatabaseQuery, name))
}
// DropDatabase drops a database
return mdb.Exec(fmt.Sprintf(dropDatabaseQuery, name))
}
logger log.Logger,
metricsHandler metrics.Handler,
connect := func() (*sqlx.DB, error) {
if cfg.Connect != nil {
return cfg.Connect(cfg)
}
}
handle := sqlplugin.NewDatabaseHandle(dbKind, connect, isConnNeedsRefreshError, logger, metricsHandler, clock.NewRealTimeSource())
plugin.go
db := newDB(dbKind, cfg.DatabaseName, handle, nil, logger)
return db, nil
}