apocexport

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 6 Imported by: 1 module, 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

Overview

Package export provides APOC export functions.

This package implements all apoc.export.* functions for exporting graph data to various formats (JSON, CSV, Cypher, GraphML).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Csv

func Csv(nodes []*Node, filePath string) error

Csv exports data to CSV format.

Example:

apoc.export.csv(nodes, '/path/to/export.csv') => exported

func CsvAll

func CsvAll(nodes []*Node, rels []*Relationship, filePath string) error

CsvAll exports all graph data to CSV.

Example:

apoc.export.csv.all('/path/to/export.csv') => exported

func CsvData

func CsvData(nodes []*Node, filePath string) error

CsvData exports specific data to CSV.

Example:

apoc.export.csv.data(nodes, '/path/to/export.csv') => exported

func Cypher

func Cypher(nodes []*Node, rels []*Relationship) string

Cypher exports data as Cypher statements.

Example:

apoc.export.cypher(nodes, rels) => Cypher statements

func CypherAll

func CypherAll(nodes []*Node, rels []*Relationship, filePath string) error

CypherAll exports all graph data as Cypher statements.

Example:

apoc.export.cypher.all('/path/to/export.cypher') => exported

func CypherData

func CypherData(nodes []*Node, rels []*Relationship, filePath string) error

CypherData exports specific data as Cypher statements.

Example:

apoc.export.cypher.data(nodes, rels, '/path/to/export.cypher') => exported

func GraphML

func GraphML(nodes []*Node, rels []*Relationship) string

GraphML exports data to GraphML format.

Example:

apoc.export.graphml(nodes, rels) => GraphML string

func GraphMLAll

func GraphMLAll(nodes []*Node, rels []*Relationship, filePath string) error

GraphMLAll exports all graph data to GraphML.

Example:

apoc.export.graphml.all('/path/to/export.graphml') => exported

func GraphMLData

func GraphMLData(nodes []*Node, rels []*Relationship, filePath string) error

GraphMLData exports specific data to GraphML.

Example:

apoc.export.graphml.data(nodes, rels, '/path/to/export.graphml') => exported

func Json

func Json(nodes []*Node, rels []*Relationship) (string, error)

Json exports data to JSON format.

Example:

apoc.export.json(nodes, relationships) => JSON string

func JsonAll

func JsonAll(nodes []*Node, rels []*Relationship, filePath string) error

JsonAll exports all graph data to JSON.

Example:

apoc.export.json.all('/path/to/export.json') => exported

func JsonData

func JsonData(nodes []*Node, rels []*Relationship, filePath string) error

JsonData exports specific data to JSON.

Example:

apoc.export.json.data(nodes, rels, '/path/to/export.json') => exported

func ToFile

func ToFile(data string, filePath string) error

ToFile writes export data to a file.

Example:

apoc.export.toFile(data, '/path/to/file.txt') => written

func ToString

func ToString(nodes []*Node, rels []*Relationship, format string) (string, error)

ToString returns export data as a string.

Example:

apoc.export.toString(nodes, rels, 'json') => string

Types

type Node

type Node struct {
	ID         int64
	Labels     []string
	Properties map[string]interface{}
}

Node represents a graph node.

type Relationship

type Relationship struct {
	ID         int64
	Type       string
	StartNode  int64
	EndNode    int64
	Properties map[string]interface{}
}

Relationship represents a graph relationship.

Jump to

Keyboard shortcuts

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