graph

package
v0.0.0-...-0bd2a67 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPS_AUTHENTICATION = "authentication"
	OPS_BYTECODE       = "bytecode"
	OPS_EVAL           = "eval"
	OPS_INVALID        = "invalid"
	OPS_CLOSE          = "close"

	REQUEST_ID               = "requestId"
	ARGS_BATCH_SIZE          = "batchSize"
	ARGS_BINDINGS            = "bindings"
	ARGS_ALIASES             = "aliases"
	ARGS_FORCE               = "force"
	ARGS_GREMLIN             = "gremlin"
	ARGS_LANGUAGE            = "language"
	ARGS_SCRIPT_EVAL_TIMEOUT = "scriptEvaluationTimeout"
	ARGS_HOST                = "host"
	ARGS_SESSION             = "session"
	ARGS_MANAGE_TRANSACTION  = "manageTransaction"
	ARGS_SASL                = "sasl"
	ARGS_SASL_MECHANISM      = "saslMechanism"
	ARGS_SIDE_EFFECT         = "sideEffect"
	ARGS_AGGREGATE_TO        = "aggregateTo"
	ARGS_SIDE_EFFECT_KEY     = "sideEffectKey"

	VAL_AGGREGATE_TO_BULKSET = "bulkset"
	VAL_AGGREGATE_TO_LIST    = "list"
	VAL_AGGREGATE_TO_MAP     = "map"
	VAL_AGGREGATE_TO_NONE    = "none"
	VAL_AGGREGATE_TO_SET     = "set"

	VAL_TRAVERSAL_SOURCE_ALIAS = "g"

	STATUS_ATTRIBUTE_EXCEPTIONS  = "exceptions"
	STATUS_ATTRIBUTE_STACK_TRACE = "stackTrace"
	STATUS_ATTRIBUTE_WARNINGS    = "warnings"
)

refers to https://github.com/apache/tinkerpop/blob/master/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Tokens.java

Variables

This section is empty.

Functions

This section is empty.

Types

type BulkSet

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

func NewBulkSet

func NewBulkSet() *BulkSet

func (*BulkSet) Add

func (b *BulkSet) Add(s interface{}, bulk int64)

func (*BulkSet) AsBulk

func (b *BulkSet) AsBulk() map[interface{}]int64

func (*BulkSet) IsEmpty

func (b *BulkSet) IsEmpty() bool

func (*BulkSet) Size

func (b *BulkSet) Size() int

func (*BulkSet) String

func (b *BulkSet) String() string

func (*BulkSet) UniqueSize

func (b *BulkSet) UniqueSize() int

type DetachedEdge

type DetachedEdge struct {
	*DetachedElement
	// contains filtered or unexported fields
}

gremlin vertexProperty class for reference

func NewDetachedEdge

func NewDetachedEdge(element *DetachedElement) *DetachedEdge

func (*DetachedEdge) AddProperty

func (d *DetachedEdge) AddProperty(p Property)

func (*DetachedEdge) InVertex

func (d *DetachedEdge) InVertex() Vertex

func (*DetachedEdge) OutVertex

func (d *DetachedEdge) OutVertex() Vertex

func (*DetachedEdge) SetVertex

func (d *DetachedEdge) SetVertex(out bool, vertex *DetachedVertex)

func (*DetachedEdge) String

func (d *DetachedEdge) String() string

type DetachedElement

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

gremlin element class for reference

func NewDetachedElement

func NewDetachedElement(id string, label string) *DetachedElement

func (*DetachedElement) Id

func (d *DetachedElement) Id() string

func (*DetachedElement) Keys

func (d *DetachedElement) Keys() []string

func (*DetachedElement) Label

func (d *DetachedElement) Label() string

func (*DetachedElement) Properties

func (d *DetachedElement) Properties(keys ...string) []Property

func (*DetachedElement) Property

func (d *DetachedElement) Property(key string) Property

func (*DetachedElement) Value

func (d *DetachedElement) Value(key string) interface{}

func (*DetachedElement) Values

func (d *DetachedElement) Values(keys ...string) []interface{}

type DetachedPath

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

func NewDetachedPath

func NewDetachedPath() *DetachedPath

func (*DetachedPath) Extend

func (d *DetachedPath) Extend(object interface{}, labels []string)

func (*DetachedPath) Labels

func (d *DetachedPath) Labels() [][]string

func (*DetachedPath) Objects

func (d *DetachedPath) Objects() []interface{}

func (*DetachedPath) Size

func (d *DetachedPath) Size() int

func (*DetachedPath) String

func (d *DetachedPath) String() string

type DetachedProperty

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

gremlin property class for reference

func NewDetachedProperty

func NewDetachedProperty(key string, value interface{}, element *DetachedElement) *DetachedProperty

func (*DetachedProperty) PElement

func (d *DetachedProperty) PElement() Element

func (*DetachedProperty) PKey

func (d *DetachedProperty) PKey() string

func (*DetachedProperty) PValue

func (d *DetachedProperty) PValue() interface{}

func (*DetachedProperty) String

func (d *DetachedProperty) String() string

type DetachedVertex

type DetachedVertex struct {
	*DetachedElement
}

gremlin vertex class for reference

func NewDetachedVertex

func NewDetachedVertex(element *DetachedElement) *DetachedVertex

func (*DetachedVertex) AddProperty

func (d *DetachedVertex) AddProperty(vp VertexProperty)

func (*DetachedVertex) Edges

func (d *DetachedVertex) Edges(out bool, label ...string) []Edge

func (*DetachedVertex) String

func (d *DetachedVertex) String() string

func (*DetachedVertex) VProperties

func (d *DetachedVertex) VProperties(keys ...string) []VertexProperty

func (*DetachedVertex) VProperty

func (d *DetachedVertex) VProperty(key string) VertexProperty

func (*DetachedVertex) Vertices

func (d *DetachedVertex) Vertices(out bool, label ...string) []Vertex

type DetachedVertexProperty

type DetachedVertexProperty struct {
	*DetachedElement
	// contains filtered or unexported fields
}

gremlin vertexProperty class for reference

func NewDetachedVertexProperty

func NewDetachedVertexProperty(element *DetachedElement, value interface{}) *DetachedVertexProperty

func (*DetachedVertexProperty) PElement

func (d *DetachedVertexProperty) PElement() Element

func (*DetachedVertexProperty) PKey

func (d *DetachedVertexProperty) PKey() string

func (*DetachedVertexProperty) PValue

func (d *DetachedVertexProperty) PValue() interface{}

func (*DetachedVertexProperty) SetVertex

func (d *DetachedVertexProperty) SetVertex(v *DetachedVertex)

func (*DetachedVertexProperty) String

func (d *DetachedVertexProperty) String() string

func (*DetachedVertexProperty) VElement

func (d *DetachedVertexProperty) VElement() Vertex

func (*DetachedVertexProperty) VLabel

func (d *DetachedVertexProperty) VLabel() string

type Edge

type Edge interface {
	Element

	// Get the outgoing vertex of this edge
	InVertex() Vertex

	// Get the incoming vertex of the edge
	OutVertex() Vertex

	fmt.Stringer
}

Edge <-- Element

type Element

type Element interface {
	// Gets the unique identifier for the graph Element
	Id() string

	// Gets the label for the graph Element which helps categorize it
	Label() string

	// Get a Property for the Element given its key
	Property(key string) Property

	// Get slice of Property where the keys is meant to be a filter on the available Keys.
	// If no keys are provide then return all the properties
	Properties(keys ...string) []Property

	// Get the value of a Property given it's key.
	Value(key string) interface{}

	// Get slice of the values of properties
	// If no keys are provide then return all the values
	Values(keys ...string) []interface{}

	// Get the keys of the properties associated with this element
	Keys() []string
}

type Path

type Path interface {
	Size() int

	Objects() []interface{}

	Labels() [][]string

	fmt.Stringer
}

Path for GDB

type Property

type Property interface {
	// The key of the property
	PKey() string

	// The value of the property
	PValue() interface{}

	// Get the element that this property is associated with
	PElement() Element

	fmt.Stringer
}

type RequestOptions

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

GDB request options

func NewRequestOptionsWithBindings

func NewRequestOptionsWithBindings(bindings map[string]interface{}) *RequestOptions

func (*RequestOptions) AddArgs

func (opt *RequestOptions) AddArgs(key string, value interface{})

func (*RequestOptions) GetArgs

func (opt *RequestOptions) GetArgs() map[string]interface{}

func (*RequestOptions) GetOverrideRequestId

func (opt *RequestOptions) GetOverrideRequestId() string

func (*RequestOptions) GetTimeout

func (opt *RequestOptions) GetTimeout() int64

func (*RequestOptions) SetRequestId

func (opt *RequestOptions) SetRequestId(requestId string)

func (*RequestOptions) SetTimeout

func (opt *RequestOptions) SetTimeout(timeout int64)

type Vertex

type Vertex interface {
	Element

	// Gets slice of incident edges
	Edges(out bool, label ...string) []Edge

	// Gets slice of adjacent vertices
	Vertices(out bool, label ...string) []Vertex

	// Get the VertexProperty for the provided key
	VProperty(key string) VertexProperty

	// Get slice of properties with provide keys
	VProperties(keys ...string) []VertexProperty

	fmt.Stringer
}

Vertex <-- Element

type VertexProperty

type VertexProperty interface {
	Element
	Property

	// override ??
	VElement() Vertex

	// override ??
	VLabel() string
}

VertexProperty <-- Property VertexProperty <-- Element

Jump to

Keyboard shortcuts

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