services

package
v0.0.0-...-89bbdfb Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: Apache-2.0, BSD-3-Clause, MIT Imports: 14 Imported by: 1

Documentation

Overview

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

Index

Constants

View Source
const (
	NODE_FORMAT   = "<_:%s> <%s> \"%s\" .\n"
	EDGE_FORMAT   = "<_:%s> <%s> <_:%s> %s .\n"
	SCHEMA_FORMAT = "%s:%s %s %s .\n"
)

Variables

This section is empty.

Functions

func GetCanonicalAttributeName

func GetCanonicalAttributeName(
	entityType string,
	attributeName string,
	targetRegex string,
	replacement string,
	addPrefixToAttr bool,
	doReplacement bool) string

func GetDgraphType

func GetDgraphType(dataType string) string

func NewDgraphImportRDF

func NewDgraphImportRDF(properties map[string]interface{}) (dbservice.ImportService, error)

func NewDgraphService

func NewDgraphService(properties map[string]interface{}) (dbservice.UpsertService, error)

func ReadableExternalId

func ReadableExternalId(nodeType string, key []interface{}) string

func TrimWhiteSpace

func TrimWhiteSpace(data string) string

Types

type DgraphImportRDF

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

func (*DgraphImportRDF) WriteGraph

func (this *DgraphImportRDF) WriteGraph(graph model.Graph) error

func (*DgraphImportRDF) WriteSchema

func (this *DgraphImportRDF) WriteSchema(userSchema interface{}, graphModel map[string]interface{}) error

type DgraphService

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

func (*DgraphService) Commit

func (this *DgraphService) Commit(
	pendingNodes map[string]*rdf.DNode,
	pendingEdges map[string]*rdf.DEdge,
	graph model.Graph) error

Need to revisit the transaction scope

func (*DgraphService) DeleteGraph

func (this *DgraphService) DeleteGraph(filter int, graphToo map[string]interface{}) error

func (*DgraphService) Destroy

func (this *DgraphService) Destroy()

func (*DgraphService) DropGraph

func (this *DgraphService) DropGraph()

func (*DgraphService) Query

func (this *DgraphService) Query(query string) (interface{}, error)

func (*DgraphService) UpsertGraph

func (this *DgraphService) UpsertGraph(graph model.Graph, graphToo map[string]interface{}) error

Jump to

Keyboard shortcuts

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