config

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Strategy   uint8
	MatchKeyFn func(entity interface{}) (interface{}, interface{}, error)
	NewRowFn   func() interface{}
	FetchSQL   string

	Update             *Update
	Insert             *Insert
	Delete             *Delete
	OperationOrder     []uint8
	HighwayHash        bool
	FetchConcurrency   int
	CompareConcurrency int
}

Config represents merger config

func (*Config) DummyMergerConfigFn

func (c *Config) DummyMergerConfigFn()

DummyMergerConfigFn dummy func for

type Delete

type Delete struct {
	Transient      *Transient
	DeleteStrategy uint8
	DeleteSQL      string
	Options        []option.Option
}

Delete represents config for update used by merge

type Insert

type Insert struct {
	Transient      *Transient
	InsertSQL      string
	InsertStrategy uint8
	LoadOptions    []loption.Option
	Options        []option.Option
}

Insert represents config for insert/upsert used by merge

type Transient

type Transient struct {
	TableName   string
	InitSQL     []string
	LoadOptions []loption.Option
}

Transient represents the configuration of the temporary and auxiliary operation associated with the actual insert/update/delete

func (*Transient) ExpandSQL

func (t *Transient) ExpandSQL(sql string) string

ExpandSQL returns an expanded sql

func (*Transient) InitSQLs

func (t *Transient) InitSQLs() []string

InitSQLs returns slice of expanded sql

func (*Transient) Table

func (t *Transient) Table() string

Table returns an expanded table name with a random part if needed

type Update

type Update struct {
	Transient      *Transient
	UpdateStrategy uint8
	UpdateSQL      string
}

Update represents config for update used by merge

Jump to

Keyboard shortcuts

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