meta

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func struct {
	Name     string
	Sig      string
	RetItems []Func
}

Func represents a function or procedure with its name and signature.

func (Func) String

func (f Func) String() string

String returns the function name.

type Metadata

type Metadata struct {
	Nodes []Node
	Rels  []Relationship
	Funcs []Func
	Procs []Func
	Props []string
}

Metadata holds information about nodes, relationships, properties, functions and procedures.

func FetchMetadata

func FetchMetadata(c *graph.Conn) (m Metadata, err error)

FetchMetadata retrieves schema information like labels, relationships, properties, functions and procedures.

type Node

type Node struct {
	Count         int64                   `json:"count" yaml:"count" view:"Count"`
	Relationships map[string]NodeRelInfo  `json:"relationships" yaml:"relationships" view:"Relationships"`
	Type          string                  `json:"type" yaml:"type" view:"Type"`
	Properties    map[string]NodeProperty `json:"properties" yaml:"properties" view:"Properties"`
	Labels        []string                `json:"labels" yaml:"labels" view:"Labels"`
}

Node describes the metamodel of a kind of nodes.

func (Node) String

func (n Node) String() string

String returns the labels of the Node.

type NodeProperty

type NodeProperty struct {
	Indexed   bool   `json:"indexed" yaml:"indexed" view:"Indexed"`
	Unique    bool   `json:"unique" yaml:"unique" view:"Unique"`
	Existence bool   `json:"existence" yaml:"existence" view:"Existence"`
	Type      string `json:"type" yaml:"type" view:"Type"`
}

NodeProperty represents a single property of a Node.

type NodeRelInfo

type NodeRelInfo struct {
	Count      int                    `json:"count" yaml:"count" view:"Count"`
	Properties map[string]RelProperty `json:"properties" yaml:"properties" view:"Properties"`
	Direction  string                 `json:"direction" yaml:"direction" view:"Direction"`
	Labels     []string               `json:"labels" yaml:"labels" view:"Labels"`
}

NodeRelInfo describes a Relationship type of one kind of nodes.

type RelProperty

type RelProperty struct {
	Array     bool   `json:"array" yaml:"array" view:"Array"`
	Indexed   bool   `json:"indexed" yaml:"indexed" view:"Indexed"`
	Existence bool   `json:"existence" yaml:"existence" view:"Existence"`
	Type      string `json:"type" yaml:"type" view:"Type"`
}

RelProperty represents a single property of a Relationship.

type Relationship

type Relationship struct {
	Count      int64                  `json:"count" yaml:"count" view:"Count"`
	Type       string                 `json:"type" yaml:"type" view:"Type"`
	Properties map[string]RelProperty `json:"properties" yaml:"properties" view:"Properties"`
}

Relationship describes the metamodel of one kind of relationships.

func (Relationship) String

func (r Relationship) String() string

String returns the relationship type.

type Schema

type Schema struct {
	Labels   []string
	RelTypes []string
	PropKeys []string
	Funcs    []Func
	Procs    []Func
}

Schema holds metadata about the database.

Jump to

Keyboard shortcuts

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