database

package
v0.0.0-...-860e413 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2022 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(config Config, useAdmin bool) (*sql.DB, error)

func DecodeHook

func DecodeHook(from, to reflect.Value) (interface{}, error)

Types

type Config

type Config struct {
	Dialects map[string]interface{} `mapstructure:",remain"`
	// contains filtered or unexported fields
}

func (Config) Database

func (c Config) Database() string

func (Config) Password

func (c Config) Password() string

func (*Config) SetConnector

func (c *Config) SetConnector(connector dialect.Connector)

func (Config) Type

func (c Config) Type() string

func (Config) Username

func (c Config) Username() string

type EnumArray

type EnumArray[F enumField] []F

func (*EnumArray[F]) Scan

func (s *EnumArray[F]) Scan(src any) error

Scan implements the `database/sql.Scanner` interface.

func (EnumArray[F]) Value

func (s EnumArray[F]) Value() (driver.Value, error)

Value implements the `database/sql/driver.Valuer“ interface.

type StringArray

type StringArray []string

func (*StringArray) Scan

func (s *StringArray) Scan(src any) error

Scan implements the `database/sql.Scanner` interface.

func (StringArray) Value

func (s StringArray) Value() (driver.Value, error)

Value implements the `database/sql/driver.Valuer“ interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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