predicate

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2020 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Overview

Package predicate contains the object to control the searching predicates of a graph traversal.

Predicates are used for when you're trying to narrow the search of a vertex or vertices on the graph without having to perform multiple searches.

A note about Predicate:

This object implements the Parameter interfaces used by graph traversals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Predicate

type Predicate string

Predicate is used when you're trying to find values like IDs or property values that meet within the criteria.

func Equal

func Equal(val interface{}) *Predicate

Equal checks if this value is exactly equal to the querying value.

func GreaterThan

func GreaterThan(val interface{}) *Predicate

GreaterThan checks if this value is greater than the querying value.

func GreaterThanOrEqual

func GreaterThanOrEqual(val interface{}) *Predicate

GreaterThanOrEqual checks if this value is greater than or equal to the querying value.

func Inside

func Inside(min, max interface{}) *Predicate

Inside checks if this value is within the minimum and maximum querying values.

func LessThan

func LessThan(val interface{}) *Predicate

LessThan checks if this value is less than the querying value.

func LessThanOrEqual

func LessThanOrEqual(val interface{}) *Predicate

LessThanOrEqual checks if this value is less than or equal to the querying value.

func NotEqual

func NotEqual(val interface{}) *Predicate

NotEqual check if this value is NOT equal to the query value.

func TextContains

func TextContains(str string) *Predicate

TextContains finds if at least one word inside the text string matches the query string.

func TextContainsFuzzy

func TextContainsFuzzy(str string) *Predicate

TextContainsFuzzy finds if one word inside the text string is similar to the query string.

func TextContainsPrefix

func TextContainsPrefix(str string) *Predicate

TextContainsPrefix finds if one word inside the text string begins with the query string.

func TextContainsRegex

func TextContainsRegex(str string) *Predicate

TextContainsRegex finds if one word inside the text string matches the given regular expression.

func TextFuzzy

func TextFuzzy(str string) *Predicate

TextFuzzy finds if the string value is similar to the given query string.

func TextPrefix

func TextPrefix(str string) *Predicate

TextPrefix finds if the string value starts with the given string.

func TextRegex

func TextRegex(str string) *Predicate

TextRegex finds if the string value matches the given regular expression in its entirety.

func Within

func Within(params ...interface{}) *Predicate

Within checks if this value is within the array values.

func (*Predicate) String

func (p *Predicate) String() string

Jump to

Keyboard shortcuts

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