File: p.go

package info (click to toggle)
golang-github-facebook-ent 0.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,284 kB
  • sloc: javascript: 349; makefile: 8
file content (89 lines) | stat: -rw-r--r-- 2,266 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// Copyright 2019-present Facebook Inc. All rights reserved.
// This source code is licensed under the Apache 2.0 license found
// in the LICENSE file in the root directory of this source tree.

package p

import (
	"github.com/facebook/ent/dialect/gremlin/graph/dsl"
)

// EQ is the equal predicate.
func EQ(v interface{}) *dsl.Traversal {
	return op("eq", v)
}

// NEQ is the not-equal predicate.
func NEQ(v interface{}) *dsl.Traversal {
	return op("neq", v)
}

// GT is the greater than predicate.
func GT(v interface{}) *dsl.Traversal {
	return op("gt", v)
}

// GTE is the greater than or equal predicate.
func GTE(v interface{}) *dsl.Traversal {
	return op("gte", v)
}

// LT is the less than predicate.
func LT(v interface{}) *dsl.Traversal {
	return op("lt", v)
}

// LTE is the less than or equal predicate.
func LTE(v interface{}) *dsl.Traversal {
	return op("lte", v)
}

// Between is the between/contains predicate.
func Between(v, u interface{}) *dsl.Traversal {
	return op("between", v, u)
}

// StartingWith is the prefix test predicate.
func StartingWith(prefix string) *dsl.Traversal {
	return op("startingWith", prefix)
}

// EndingWith is the suffix test predicate.
func EndingWith(suffix string) *dsl.Traversal {
	return op("endingWith", suffix)
}

// Containing is the sub string test predicate.
func Containing(substr string) *dsl.Traversal {
	return op("containing", substr)
}

// NotStartingWith is the negation of StartingWith.
func NotStartingWith(prefix string) *dsl.Traversal {
	return op("notStartingWith", prefix)
}

// NotEndingWith is the negation of EndingWith.
func NotEndingWith(suffix string) *dsl.Traversal {
	return op("notEndingWith", suffix)
}

// NotContaining is the negation of Containing.
func NotContaining(substr string) *dsl.Traversal {
	return op("notContaining", substr)
}

// Within Determines if a value is within the specified list of values.
func Within(args ...interface{}) *dsl.Traversal {
	return op("within", args...)
}

// Without determines if a value is not within the specified list of values.
func Without(args ...interface{}) *dsl.Traversal {
	return op("without", args...)
}

func op(name string, args ...interface{}) *dsl.Traversal {
	t := &dsl.Traversal{}
	return t.Add(dsl.NewFunc(name, args...))
}