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 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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