adminimport

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.Engine, opts Neo4jCSVExportOptions) error

Types

type Error

type Error struct {
	ExitCode         int
	Message          string
	LocalizedMessage localization.Message
	Err              error
}

func NewLocalizedError added in v1.3.1

func NewLocalizedError(exitCode int, message localization.Message, err error) *Error

NewLocalizedError creates an import error with a stable exit code and message descriptor.

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