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

Function getConnectionID

backend/plugin/db/mysql/mysql.go:601–607  ·  view source on GitHub ↗
(ctx context.Context, conn *sql.Conn)

Source from the content-addressed store, hash-verified

599}
600
601func getConnectionID(ctx context.Context, conn *sql.Conn) (string, error) {
602 var id string
603 if err := conn.QueryRowContext(ctx, `SELECT CONNECTION_ID();`).Scan(&id); err != nil {
604 return "", err
605 }
606 return id, nil
607}

Callers 2

ExecuteMethod · 0.70
QueryConnMethod · 0.70

Calls 1

ScanMethod · 0.80

Tested by

no test coverage detected