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

generator

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasDefaults added in v0.26.1

func HasDefaults(rType reflect.Type) bool

HasDefaults reports whether tagged fields require native default generation.

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, metaSessionCacheKey string, cache *sync.Map) (*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