pgx

package
v1.0.0-dev.195 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginsRoot = root + ".plugins"
)

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewDB

func NewDB(ctx context.Context, plugins ...sqll.Plugin) (*sql.DB, error)

NewDB returns a new DB.

func NewDBWithConfigPath

func NewDBWithConfigPath(ctx context.Context, path string, plugins ...sqll.Plugin) (*sql.DB, error)

NewDBWithConfigPath returns a new sql DB with options from config path.

func NewDBWithOptions

func NewDBWithOptions(ctx context.Context, o *Options, plugins ...sqll.Plugin) (db *sql.DB, err error)

NewDBWithOptions returns a new sql DB with options.

Types

type Options

type Options struct {
	ConnectString string
	Username      string
	Password      string
}

Options represents a godror options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals a given key path into options and returns it.

Jump to

Keyboard shortcuts

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