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

config

package
v0.26.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: Apache-2.0 Imports: 10 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Columns

func Columns(ctx context.Context, session *sink.Session, db *sql.DB, table string, options ...option.Option) ([]sink.Column, error)

Columns returns table columns

func Dialect

func Dialect(ctx context.Context, db *sql.DB, opts ...option.Option) (*info.Dialect, error)

Dialect returns a dialect

func LoadSession

func LoadSession(dialect *info.Dialect) io.LoadExecutor

LoadSession Returns new session for specified Dialect

func MergeExecutor added in v0.14.0

func MergeExecutor(dialect *info.Dialect, config info.MergeConfig) (io.MergeExecutor, error)

MergeExecutor returns new merge executor for specified dialect

func Session

func Session(ctx context.Context, db *sql.DB, options ...option.Option) (*sink.Session, error)

Session retrieve basic data from the database connection

func SessionCached added in v0.21.0

func SessionCached(ctx context.Context, db *sql.DB, aDialect *info.Dialect, metaSessionCacheKey string, cache *sync.Map, options ...option.Option) (*sink.Session, error)

Types

type Config

type Config struct {
	TableName         string
	Identity          string
	Columns           io.Columns
	Dialect           *info.Dialect
	Mapper            io.ColumnMapper
	Builder           io.Builder
	OnDuplicateKeySql string
}

Config represents general config

func New

func New(tableName string) *Config

New creates a config

func (*Config) ApplyOption

func (c *Config) ApplyOption(ctx context.Context, db *sql.DB, options ...option.Option) error

ApplyOption applied config option

Jump to

Keyboard shortcuts

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