Documentation
¶
Index ¶
- Constants
- Variables
- func AddKind(reference graph.Criteria, kind graph.Kind) *cypherModel.UpdatingClause
- func AddKinds(reference graph.Criteria, kinds graph.Kinds) *cypherModel.UpdatingClause
- func After(reference graph.Criteria, value any) *cypherModel.Comparison
- func And(criteria ...graph.Criteria) *cypherModel.Conjunction
- func Ascending() cypherModel.SortOrder
- func Before(reference graph.Criteria, value time.Time) *cypherModel.Comparison
- func BeforeGraphQuery(reference1, reference2 graph.Criteria) *cypherModel.Comparison
- func CaseInsensitiveStringContains(reference graph.Criteria, value string) *cypherModel.Comparison
- func CaseInsensitiveStringEndsWith(reference graph.Criteria, value string) *cypherModel.Comparison
- func CaseInsensitiveStringStartsWith(reference graph.Criteria, value string) *cypherModel.Comparison
- func Count(reference graph.Criteria) *cypherModel.FunctionInvocation
- func CountDistinct(reference graph.Criteria) *cypherModel.FunctionInvocation
- func Create(elements ...graph.Criteria) *cypherModel.UpdatingClause
- func Delete(leaves ...graph.Criteria) *cypherModel.UpdatingClause
- func DeleteKind(reference graph.Criteria, kind graph.Kind) *cypherModel.UpdatingClause
- func DeleteKinds(reference graph.Criteria, kinds graph.Kinds) *cypherModel.UpdatingClause
- func DeleteProperties(reference graph.Criteria, propertyNames ...string) *cypherModel.UpdatingClause
- func DeleteProperty(reference *cypherModel.PropertyLookup) *cypherModel.UpdatingClause
- func Descending() cypherModel.SortOrder
- func EmptySinglePartQuery() *cypherModel.RegularQuery
- func End() *cypher.Variable
- func EndID() *cypher.FunctionInvocation
- func EndNodePattern(kinds graph.Kinds, properties *cypherModel.Parameter) *cypherModel.NodePattern
- func EndProperty(name string) *cypherModel.PropertyLookup
- func Equals(reference graph.Criteria, value any) *cypherModel.Comparison
- func Exists(reference graph.Criteria) *cypherModel.Comparison
- func GetFirstReadingClause(query *cypherModel.RegularQuery) *cypherModel.ReadingClause
- func GreaterThan(reference graph.Criteria, value any) *cypherModel.Comparison
- func GreaterThanOrEquals(reference graph.Criteria, value any) *cypherModel.Comparison
- func HasRelationships(reference *cypherModel.Variable) *cypherModel.PatternPredicate
- func Identity(entity cypher.Expression) *cypher.FunctionInvocation
- func In(reference graph.Criteria, value any) *cypherModel.Comparison
- func InIDs[T *cypherModel.FunctionInvocation | *cypherModel.Variable](reference T, ids ...graph.ID) *cypherModel.Comparison
- func InInverted(reference graph.Criteria, value any) *cypherModel.Comparison
- func IsNotNull(reference graph.Criteria) *cypherModel.Comparison
- func IsNull(reference graph.Criteria) *cypherModel.Comparison
- func Kind(reference graph.Criteria, kinds ...graph.Kind) *cypherModel.KindMatcher
- func KindIn(reference graph.Criteria, kinds ...graph.Kind) *cypherModel.KindMatcher
- func KindsOf(ref graph.Criteria) *cypherModel.FunctionInvocation
- func LessThan(reference graph.Criteria, value any) *cypherModel.Comparison
- func LessThanGraphQuery(reference1, reference2 graph.Criteria) *cypherModel.Comparison
- func LessThanOrEquals(reference graph.Criteria, value any) *cypherModel.Comparison
- func Limit(limit int) *cypherModel.Limit
- func Literal(value any) *cypherModel.Literal
- func Node() *cypher.Variable
- func NodeID() *cypher.FunctionInvocation
- func NodePattern(kinds graph.Kinds, properties *cypherModel.Parameter) *cypherModel.NodePattern
- func NodeProperty(name string) *cypherModel.PropertyLookup
- func Not(expression graph.Criteria) *cypherModel.Negation
- func Offset(offset int) *cypherModel.Skip
- func Or(criteria ...graph.Criteria) *cypherModel.Parenthetical
- func Order(reference, direction graph.Criteria) *cypherModel.SortItem
- func OrderBy(leaves ...graph.Criteria) *cypherModel.Order
- func Parameter(value any) *cypherModel.Parameter
- func Path() *cypher.Variable
- func Property(qualifier graph.Criteria, name string) *cypherModel.PropertyLookup
- func Relationship() *cypher.Variable
- func RelationshipID() *cypher.FunctionInvocation
- func RelationshipPattern(kind graph.Kind, properties *cypherModel.Parameter, direction graph.Direction) *cypherModel.RelationshipPattern
- func RelationshipProperty(name string) *cypherModel.PropertyLookup
- func Returning(elements ...graph.Criteria) *cypherModel.Return
- func ReturningDistinct(elements ...graph.Criteria) *cypherModel.Return
- func SetProperties(reference graph.Criteria, properties map[string]any) *cypherModel.UpdatingClause
- func SetProperty(reference graph.Criteria, value any) *cypherModel.UpdatingClause
- func SinglePartQuery(expressions ...graph.Criteria) *cypherModel.RegularQuery
- func Size(expression graph.Criteria) *cypherModel.FunctionInvocation
- func Start() *cypher.Variable
- func StartID() *cypher.FunctionInvocation
- func StartNodePattern(kinds graph.Kinds, properties *cypherModel.Parameter) *cypherModel.NodePattern
- func StartProperty(name string) *cypherModel.PropertyLookup
- func StringContains(reference graph.Criteria, value string) *cypherModel.Comparison
- func StringEndsWith(reference graph.Criteria, value string) *cypherModel.Comparison
- func StringStartsWith(reference graph.Criteria, value string) *cypherModel.Comparison
- func Update(clauses ...*cypherModel.UpdatingClause) []*cypherModel.UpdatingClause
- func Updatef(provider graph.CriteriaProvider) []*cypherModel.UpdatingClause
- func Variable(name string) *cypher.Variable
- func Where(expression graph.Criteria) *cypherModel.Where
- func Xor(criteria ...graph.Criteria) *cypherModel.ExclusiveDisjunction
- type Builder
- type Cache
- type ParameterRewriter
- type SortDirection
- type SortItem
- type SortItems
Constants ¶
View Source
const ( PathSymbol = "p" NodeSymbol = "n" EdgeSymbol = "r" EdgeStartSymbol = "s" EdgeEndSymbol = "e" )
Variables ¶
View Source
var (
ErrAmbiguousQueryVariables = errors.New("query mixes node and relationship query variables")
)
Functions ¶
func AddKind ¶
func AddKind(reference graph.Criteria, kind graph.Kind) *cypherModel.UpdatingClause
func AddKinds ¶
func AddKinds(reference graph.Criteria, kinds graph.Kinds) *cypherModel.UpdatingClause
func After ¶
func After(reference graph.Criteria, value any) *cypherModel.Comparison
func And ¶
func And(criteria ...graph.Criteria) *cypherModel.Conjunction
func Ascending ¶
func Ascending() cypherModel.SortOrder
func Before ¶
func Before(reference graph.Criteria, value time.Time) *cypherModel.Comparison
func BeforeGraphQuery ¶
func BeforeGraphQuery(reference1, reference2 graph.Criteria) *cypherModel.Comparison
func CaseInsensitiveStringContains ¶
func CaseInsensitiveStringContains(reference graph.Criteria, value string) *cypherModel.Comparison
func CaseInsensitiveStringEndsWith ¶
func CaseInsensitiveStringEndsWith(reference graph.Criteria, value string) *cypherModel.Comparison
func CaseInsensitiveStringStartsWith ¶
func CaseInsensitiveStringStartsWith(reference graph.Criteria, value string) *cypherModel.Comparison
func Count ¶
func Count(reference graph.Criteria) *cypherModel.FunctionInvocation
func CountDistinct ¶
func CountDistinct(reference graph.Criteria) *cypherModel.FunctionInvocation
func Create ¶
func Create(elements ...graph.Criteria) *cypherModel.UpdatingClause
func Delete ¶
func Delete(leaves ...graph.Criteria) *cypherModel.UpdatingClause
func DeleteKind ¶
func DeleteKind(reference graph.Criteria, kind graph.Kind) *cypherModel.UpdatingClause
func DeleteKinds ¶
func DeleteKinds(reference graph.Criteria, kinds graph.Kinds) *cypherModel.UpdatingClause
func DeleteProperties ¶
func DeleteProperties(reference graph.Criteria, propertyNames ...string) *cypherModel.UpdatingClause
func DeleteProperty ¶
func DeleteProperty(reference *cypherModel.PropertyLookup) *cypherModel.UpdatingClause
func Descending ¶
func Descending() cypherModel.SortOrder
func EmptySinglePartQuery ¶
func EmptySinglePartQuery() *cypherModel.RegularQuery
func EndID ¶
func EndID() *cypher.FunctionInvocation
func EndNodePattern ¶
func EndNodePattern(kinds graph.Kinds, properties *cypherModel.Parameter) *cypherModel.NodePattern
func EndProperty ¶
func EndProperty(name string) *cypherModel.PropertyLookup
func Equals ¶
func Equals(reference graph.Criteria, value any) *cypherModel.Comparison
func Exists ¶
func Exists(reference graph.Criteria) *cypherModel.Comparison
func GetFirstReadingClause ¶
func GetFirstReadingClause(query *cypherModel.RegularQuery) *cypherModel.ReadingClause
func GreaterThan ¶
func GreaterThan(reference graph.Criteria, value any) *cypherModel.Comparison
func GreaterThanOrEquals ¶
func GreaterThanOrEquals(reference graph.Criteria, value any) *cypherModel.Comparison
func HasRelationships ¶
func HasRelationships(reference *cypherModel.Variable) *cypherModel.PatternPredicate
func Identity ¶
func Identity(entity cypher.Expression) *cypher.FunctionInvocation
func In ¶
func In(reference graph.Criteria, value any) *cypherModel.Comparison
func InIDs ¶
func InIDs[T *cypherModel.FunctionInvocation | *cypherModel.Variable](reference T, ids ...graph.ID) *cypherModel.Comparison
func InInverted ¶
func InInverted(reference graph.Criteria, value any) *cypherModel.Comparison
func IsNotNull ¶
func IsNotNull(reference graph.Criteria) *cypherModel.Comparison
func IsNull ¶
func IsNull(reference graph.Criteria) *cypherModel.Comparison
func Kind ¶
func Kind(reference graph.Criteria, kinds ...graph.Kind) *cypherModel.KindMatcher
func KindIn ¶
func KindIn(reference graph.Criteria, kinds ...graph.Kind) *cypherModel.KindMatcher
func KindsOf ¶
func KindsOf(ref graph.Criteria) *cypherModel.FunctionInvocation
func LessThan ¶
func LessThan(reference graph.Criteria, value any) *cypherModel.Comparison
func LessThanGraphQuery ¶
func LessThanGraphQuery(reference1, reference2 graph.Criteria) *cypherModel.Comparison
func LessThanOrEquals ¶
func LessThanOrEquals(reference graph.Criteria, value any) *cypherModel.Comparison
func Limit ¶
func Limit(limit int) *cypherModel.Limit
func Literal ¶
func Literal(value any) *cypherModel.Literal
func NodeID ¶
func NodeID() *cypher.FunctionInvocation
func NodePattern ¶
func NodePattern(kinds graph.Kinds, properties *cypherModel.Parameter) *cypherModel.NodePattern
func NodeProperty ¶
func NodeProperty(name string) *cypherModel.PropertyLookup
func Offset ¶
func Offset(offset int) *cypherModel.Skip
func Or ¶
func Or(criteria ...graph.Criteria) *cypherModel.Parenthetical
func Parameter ¶
func Parameter(value any) *cypherModel.Parameter
func Property ¶
func Property(qualifier graph.Criteria, name string) *cypherModel.PropertyLookup
func Relationship ¶
func RelationshipID ¶
func RelationshipID() *cypher.FunctionInvocation
func RelationshipPattern ¶
func RelationshipPattern(kind graph.Kind, properties *cypherModel.Parameter, direction graph.Direction) *cypherModel.RelationshipPattern
func RelationshipProperty ¶
func RelationshipProperty(name string) *cypherModel.PropertyLookup
func ReturningDistinct ¶
func ReturningDistinct(elements ...graph.Criteria) *cypherModel.Return
func SetProperties ¶
func SetProperties(reference graph.Criteria, properties map[string]any) *cypherModel.UpdatingClause
func SetProperty ¶
func SetProperty(reference graph.Criteria, value any) *cypherModel.UpdatingClause
func SinglePartQuery ¶
func SinglePartQuery(expressions ...graph.Criteria) *cypherModel.RegularQuery
func Size ¶
func Size(expression graph.Criteria) *cypherModel.FunctionInvocation
func StartID ¶
func StartID() *cypher.FunctionInvocation
func StartNodePattern ¶
func StartNodePattern(kinds graph.Kinds, properties *cypherModel.Parameter) *cypherModel.NodePattern
func StartProperty ¶
func StartProperty(name string) *cypherModel.PropertyLookup
func StringContains ¶
func StringContains(reference graph.Criteria, value string) *cypherModel.Comparison
func StringEndsWith ¶
func StringEndsWith(reference graph.Criteria, value string) *cypherModel.Comparison
func StringStartsWith ¶
func StringStartsWith(reference graph.Criteria, value string) *cypherModel.Comparison
func Update ¶
func Update(clauses ...*cypherModel.UpdatingClause) []*cypherModel.UpdatingClause
func Updatef ¶
func Updatef(provider graph.CriteriaProvider) []*cypherModel.UpdatingClause
func Xor ¶
func Xor(criteria ...graph.Criteria) *cypherModel.ExclusiveDisjunction
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func NewBuilder ¶
func NewBuilderWithCriteria ¶
func (*Builder) Build ¶
func (s *Builder) Build(allShortestPaths bool) (*cypher.RegularQuery, error)
func (*Builder) RegularQuery ¶
func (s *Builder) RegularQuery() *cypher.RegularQuery
type ParameterRewriter ¶
type ParameterRewriter struct {
walk.Visitor[cypher.SyntaxNode]
Parameters map[string]any
// contains filtered or unexported fields
}
func NewParameterRewriter ¶
func NewParameterRewriter() *ParameterRewriter
func (*ParameterRewriter) Enter ¶
func (s *ParameterRewriter) Enter(node cypher.SyntaxNode)
type SortDirection ¶
type SortDirection string
const SortDirectionAscending SortDirection = "asc"
const SortDirectionDescending SortDirection = "desc"
type SortItem ¶
type SortItem struct {
SortCriteria graph.Criteria
Direction SortDirection
}
Click to show internal directories.
Click to hide internal directories.