generator

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder represent default value builder

func NewBuilder

func NewBuilder(columns []sink.Column, batchSize int) *Builder

NewBuilder returns default values builder

func (Builder) Build

func (b Builder) Build(options ...option.Option) string

Build builds default values statement

type Default

type Default struct {
	// contains filtered or unexported fields
}

Default represents generator for default strategy TODO: Add order to union TODO: Refresh session when rType changes

func NewDefault

func NewDefault(ctx context.Context, dialect *info.Dialect, db *sql.DB, session *sink.Session) (*Default, error)

NewDefault creates a default generator

func (*Default) Apply

func (d *Default) Apply(ctx context.Context, any interface{}, table string, batchSize int) error

Apply generated values to the any

Jump to

Keyboard shortcuts

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