config

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: Apache-2.0 Imports: 9 Imported by: 4

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.Session

LoadSession Returns new session 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

Types

type Config

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

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