-
Notifications
You must be signed in to change notification settings - Fork 2
/
artisan.go
50 lines (39 loc) · 1.09 KB
/
artisan.go
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
package artisan
import (
art "github.com/rkrasiuk/cypher-artisan/ascii-art"
"github.com/rkrasiuk/cypher-artisan/builder"
)
const (
// PlainPath represents `--` path
PlainPath = art.Plain
// OutgoingPath represents `-->` path
OutgoingPath = art.Outgoing
// IncomingPath represents `<--` path
IncomingPath = art.Incoming
// BidirectionalPath represents `<-->` path
BidirectionalPath = art.Bidirectional
)
// Prop ...
type Prop = art.Prop
// Node return a pointer to new Node `()`
// In case no name needed to be provided pass an empty string
func Node(name string) *art.Node {
return art.NewNode(name)
}
// Edge return a pointer to new Edge `-[]-`
// In case no name needed to be provided pass an empty string
func Edge(name string) *art.Edge {
return art.NewEdge(name)
}
// QueryBuilder represents a new QueryBuilder for Cypher
func QueryBuilder() builder.QueryBuilder {
return builder.NewQueryBuilder()
}
// As ...
func As(initial, alias string) string {
return builder.As(initial, alias)
}
// Assign ...
func Assign(name, pattern string) string {
return builder.Assign(name, pattern)
}