Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetectDriver ¶
DetectDriver infers the database driver name from a DSN string.
- "postgres://" or "postgresql://" prefix → "pgx"
- Contains "@" (MySQL-style user:pass@tcp(…)/db) → "mysql"
- Contains "=" but not "@" (PostgreSQL key=value style) → "pgx"
- Otherwise → error
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps a database connection for running EXPLAIN queries.
Click to show internal directories.
Click to hide internal directories.