Help us shape the future of Go! Take the 2026 Go Developer Survey

db2

package
v0.5.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(_ context.Context, _ string) (*sql.DB, error)

Connect is a stub used when DB2 support is not compiled in. The go_ibm_db driver requires cgo and the IBM clidriver at build time, so it is only included when building with -tags db2.

func DSNDatabase added in v0.5.15

func DSNDatabase(dsn string) string

DSNDatabase returns the DATABASE keyword value from a native DB2 DSN, or "" if absent.

func IsAuthError added in v0.5.15

func IsAuthError(_ error) bool

IsAuthError is a stub; the DB2 driver error types are unavailable without -tags db2.

func IsNativeDSN added in v0.5.15

func IsNativeDSN(dsn string) bool

IsNativeDSN reports whether dsn is DB2's native ODBC keyword=value form.

func ParseNativeDSN added in v0.5.15

func ParseNativeDSN(dsn string) (string, bool)

ParseNativeDSN reports whether dsn is DB2's native ODBC keyword=value form (not a URL), returning its DATABASE value if present. HOSTNAME, not DATABASE alone, is the native marker, since other engines' ODBC/ADO strings also carry DATABASE; every caller shares this one detector to avoid drift.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL