get

package
v0.0.0-...-8832f83 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

_       _

*__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate. All rights reserved. * LICENSE: https://github.com/creativesoftwarefdn/weaviate/blob/develop/LICENSE.md * DESIGN & CONCEPT: Bob van Luijt (@bobvanluijt) * CONTACT: hello@creativesoftwarefdn.org

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(dbSchema *schema.Schema, peers peers.Peers, logger *messages.Messaging) (*graphql.Field, error)

Build the Local.Get part of the graphql tree

Types

type LocalRef

type LocalRef struct {
	AtClass string
	Fields  map[string]interface{}
}

LocalRef to be filled by the database connector to indicate that the particular reference field is a local ref and does not require further resolving, as opposed to a NetworkRef.

type NetworkRef

type NetworkRef struct {
	crossrefs.NetworkKind
}

NetworkRef is a WIP, it will most likely change

type Params

type Params struct {
	Kind       kind.Kind
	Filters    *common_filters.LocalFilter
	ClassName  string
	Pagination *common.Pagination
	Properties []SelectProperty
}

type Resolver

type Resolver interface {
	LocalGetClass(info *Params) (interface{}, error)
}

type SelectClass

type SelectClass struct {
	ClassName     string
	RefProperties []SelectProperty
}

type SelectProperty

type SelectProperty struct {
	Name string

	IsPrimitive bool

	// Include the __typename in all the Refs below.
	IncludeTypeName bool

	// Not a primitive type? Then select these properties.
	Refs []SelectClass
}

func (SelectProperty) FindSelectClass

func (sp SelectProperty) FindSelectClass(className schema.ClassName) *SelectClass

FindSelectClass by specifying the exact class name

func (SelectProperty) HasPeer

func (sp SelectProperty) HasPeer(peerName string) bool

HasPeer returns true if any of the referenced classes are from the specified peer

Directories

Path Synopsis
_ _ *__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate.
_ _ *__ _____ __ ___ ___ __ _| |_ ___ *\ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \ * \ V V / __/ (_| |\ V /| | (_| | || __/ * \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___| * * Copyright © 2016 - 2019 Weaviate.

Jump to

Keyboard shortcuts

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