adminimport

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitOK                  = 0
	ExitCSV                 = 2
	ExitBadRelationship     = 3
	ExitDuplicateID         = 4
	ExitConstraintViolation = 5
	ExitUnsupported         = 6
)
View Source
const Neo4jCSVNornicSchemaFileName = "schema.nornic.json"
View Source
const Neo4jCSVSchemaFileName = "schema.cypher"

Variables

This section is empty.

Functions

func DefaultNeo4jCSVNornicSchemaPath

func DefaultNeo4jCSVNornicSchemaPath(dir string) string

func DefaultNeo4jCSVSchemaPath

func DefaultNeo4jCSVSchemaPath(dir string) string

func DiscoverNeo4jCSVSources

func DiscoverNeo4jCSVSources(dir string, opts Options) (nodeSources []string, relSources []string, err error)

func ExportNeo4jCSV

func ExportNeo4jCSV(engine storage.ExportableEngine, opts Neo4jCSVExportOptions) error

Types

type Error

type Error struct {
	ExitCode int
	Message  string
	Err      error
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type Neo4jCSVExportOptions

type Neo4jCSVExportOptions struct {
	OutputDir       string
	Delimiter       rune
	ArrayDelimiter  rune
	VectorDelimiter rune
	Quote           rune
}

type Options

type Options struct {
	DatabaseName         string
	NodeSources          []string
	RelSources           []string
	DataDir              string
	Delimiter            rune
	ArrayDelimiter       rune
	VectorDelimiter      rune
	Quote                rune
	IDType               string
	NormalizeTypes       bool
	IgnoreExtraColumns   bool
	IgnoreEmptyStrings   bool
	BadTolerance         int
	SkipBadRelationships bool
	SkipDuplicateNodes   bool
	ReportFile           string
	SchemaFile           string
	BuildIndexes         bool
	ChunkSize            int
	Now                  time.Time
	Verbose              bool
}

type Report

type Report struct {
	DatabaseName          string        `json:"databaseName"`
	NodesImported         int64         `json:"nodesImported"`
	RelationshipsImported int64         `json:"relationshipsImported"`
	BadRelationships      int64         `json:"badRelationships"`
	DuplicateNodesSkipped int64         `json:"duplicateNodesSkipped"`
	IndexesBuilt          bool          `json:"indexesBuilt"`
	StartedAt             time.Time     `json:"startedAt"`
	CompletedAt           time.Time     `json:"completedAt"`
	Duration              time.Duration `json:"durationNanos"`
	Status                string        `json:"status"`
	Errors                []string      `json:"errors,omitempty"`
}

func ImportFull

func ImportFull(ctx context.Context, engine storage.Engine, opts Options) (Report, error)

Jump to

Keyboard shortcuts

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