materialise

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorUpsertMapper = errors.New("upsert mapper")
View Source
var ErrorUpsertRepository = errors.New("upsert repository")

Functions

func NewBatchUpsert added in v0.1.1

func NewBatchUpsert[T any](configurations ...runtime.Configuration[*BatchUpsert[T]]) stateless.BatchFunction

constructor

func WithBatchUpsertMapFunction added in v0.1.1

func WithBatchUpsertMapFunction[T any](mapper MapFunction[structure.Bytes, structure.Bytes, T]) runtime.Configuration[*BatchUpsert[T]]

func WithBatchUpsertRepository added in v0.1.1

func WithBatchUpsertRepository[T any](repository UpsertRepository[T]) runtime.Configuration[*BatchUpsert[T]]

configuration

Types

type BatchUpsert

type BatchUpsert[T any] struct {
	// contains filtered or unexported fields
}

func (*BatchUpsert[T]) Apply

type MapFunction

type MapFunction[K any, V any, T any] func(context.Context, flow.Message[K, V]) ([]T, error)

func ConvertOneToOne added in v0.0.7

func ConvertOneToOne[IK any, IV any, T any](
	source MapFunction[IK, IV, T],
	ik format.Format[IK],
	iv format.Format[IV],
) MapFunction[structure.Bytes, structure.Bytes, T]

type UpsertRepository

type UpsertRepository[T any] interface {
	Upsert(context.Context, []T) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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