writer

package
v0.0.0-...-142d441 Latest Latest
Warning

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

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

Documentation

Overview

Package writer implements a writer logic for the Neo4j Destination.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyRawData occurs when trying to structurize empty [sdk.RawData].
	ErrEmptyRawData = errors.New("empty raw data")
	// ErrUnsupportedEntityType occurs when the entityType is unsupported by the [Writer].
	ErrUnsupportedEntityType = errors.New("unsupported entity type")
	// ErrEmptySourceNode occurs when the entityType is relationship but a payload doesn't contain sourceNode.
	ErrEmptySourceNode = errors.New("empty source node")
	// ErrEmptyTargetNode occurs when the entityType is relationship but a payload doesn't contain targetNode.
	ErrEmptyTargetNode = errors.New("empty target node")
)

Functions

This section is empty.

Types

type Params

type Params struct {
	Driver       neo4j.DriverWithContext
	DatabaseName string
	EntityType   config.EntityType
	EntityLabels []string
}

Params holds incoming params for the Writer.

type Writer

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

Writer implements a writer logic for the Neo4j Destination.

func New

func New(params Params) *Writer

New creates a new instance of the Writer.

func (*Writer) Write

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

Write writes a record to the destination.

Jump to

Keyboard shortcuts

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