writer

package
v0.0.0-...-4ff6b87 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNoPayload occurs when there's no payload to insert or update.
	ErrNoPayload = errors.New("no payload")
	// ErrNoKey occurs when there is no value for key.
	ErrNoKey = errors.New("key value must be provided")
)

Functions

This section is empty.

Types

type Writer

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

Writer implements a writer logic for Redshift destination.

func NewWriter

func NewWriter(ctx context.Context, driverName string, config config.Destination) (*Writer, error)

NewWriter creates new instance of the Writer.

func (*Writer) Delete

func (w *Writer) Delete(ctx context.Context, record sdk.Record) error

Delete deletes a record.

func (*Writer) Insert

func (w *Writer) Insert(ctx context.Context, record sdk.Record) error

Insert inserts a record.

func (*Writer) Stop

func (w *Writer) Stop() error

Stop closes database connection.

func (*Writer) Update

func (w *Writer) Update(ctx context.Context, record sdk.Record) error

Update updates a record.

Jump to

Keyboard shortcuts

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