Documentation
¶
Index ¶
- Constants
- Variables
- func CanEmitBarePropertyKeyName(name string) bool
- func Copy[T any](value T, extensions ...CopyExtension[T]) T
- func EscapePropertyKeyName(name string) string
- func IsEscapedPropertyKeyName(name string) bool
- func NewRegularQueryWithSingleQuery() (*RegularQuery, *SinglePartQuery)
- func UnescapePropertyKeyName(name string) string
- func ValidatePropertyKeyName(name string) error
- func WithErrors[T Fallible](fallible T, errs ...error) T
- type ArithmeticExpression
- type AssignmentOperator
- type Comparison
- type Conjunction
- func (s *Conjunction) Add(expression Expression)
- func (s *Conjunction) AddSlice(expressions []Expression)
- func (s *Conjunction) Get(index int) Expression
- func (s *Conjunction) GetAll() []Expression
- func (s *Conjunction) IndexOf(expressionToFind Expression) int
- func (s *Conjunction) Len() int
- func (s *Conjunction) Remove(expressionToRemove Expression) bool
- func (s *Conjunction) Replace(index int, expression Expression)
- type CopyExtension
- type Create
- type Delete
- type Disjunction
- func (s *Disjunction) Add(expression Expression)
- func (s *Disjunction) AddSlice(expressions []Expression)
- func (s *Disjunction) Get(index int) Expression
- func (s *Disjunction) GetAll() []Expression
- func (s *Disjunction) IndexOf(expressionToFind Expression) int
- func (s *Disjunction) Len() int
- func (s *Disjunction) Remove(expressionToRemove Expression) bool
- func (s *Disjunction) Replace(index int, expression Expression)
- type ExclusiveDisjunction
- func (s *ExclusiveDisjunction) Add(expression Expression)
- func (s *ExclusiveDisjunction) AddSlice(expressions []Expression)
- func (s *ExclusiveDisjunction) Get(index int) Expression
- func (s *ExclusiveDisjunction) GetAll() []Expression
- func (s *ExclusiveDisjunction) IndexOf(expressionToFind Expression) int
- func (s *ExclusiveDisjunction) Len() int
- func (s *ExclusiveDisjunction) Remove(expressionToRemove Expression) bool
- func (s *ExclusiveDisjunction) Replace(index int, expression Expression)
- type Expression
- type ExpressionList
- type Fallible
- type FilterExpression
- type FunctionInvocation
- type IDInCollection
- type KindMatcher
- type Limit
- type ListLiteral
- type Literal
- type MapItem
- type MapLiteral
- type Match
- type Merge
- type MergeAction
- type MultiPartQuery
- type MultiPartQueryPart
- type Negation
- type NodePattern
- type Operator
- type Order
- type Parameter
- type Parenthetical
- type PartialArithmeticExpression
- type PartialComparison
- type PatternElement
- type PatternPart
- type PatternPredicate
- type PatternRange
- type Projection
- type ProjectionItem
- type Properties
- type PropertyLookup
- type Quantifier
- type QuantifierType
- type RangeQuantifier
- type ReadingClause
- type RegularQuery
- type RelationshipPattern
- type Remove
- type RemoveItem
- type Return
- type Set
- type SetItem
- type SinglePartQuery
- func (s *SinglePartQuery) AddError(err error)
- func (s *SinglePartQuery) AddReadingClause(clause *ReadingClause)
- func (s *SinglePartQuery) AddUpdatingClause(clause *UpdatingClause)
- func (s *SinglePartQuery) Errors() []error
- func (s *SinglePartQuery) NewMatch(optional bool) *Match
- func (s *SinglePartQuery) NewProjection(distinct bool) *Projection
- func (s *SinglePartQuery) NewReadingClause() *ReadingClause
- type SingleQuery
- type Skip
- type SortItem
- type SortOrder
- type SyntaxNode
- type UnaryAddOrSubtractExpression
- type Unwind
- type UpdatingClause
- type Variable
- type Where
- func (s *Where) Add(expression Expression)
- func (s *Where) AddSlice(expressions []Expression)
- func (s *Where) Get(index int) Expression
- func (s *Where) GetAll() []Expression
- func (s *Where) IndexOf(expressionToFind Expression) int
- func (s *Where) Len() int
- func (s *Where) Remove(expressionToRemove Expression) bool
- func (s *Where) Replace(index int, expression Expression)
- type With
Constants ¶
const ( CountFunction = "count" DateFunction = "date" TimeFunction = "time" LocalTimeFunction = "localtime" DateTimeFunction = "datetime" LocalDateTimeFunction = "localdatetime" DurationFunction = "duration" IdentityFunction = "id" ToLowerFunction = "tolower" ToUpperFunction = "toupper" NodeLabelsFunction = "labels" EdgeTypeFunction = "type" StartNodeFunction = "startnode" EndNodeFunction = "endnode" StringSplitToArrayFunction = "split" ToStringFunction = "tostring" ToIntegerFunction = "tointeger" ListSizeFunction = "size" HeadFunction = "head" TailFunction = "tail" NodesFunction = "nodes" RelationshipsFunction = "relationships" CoalesceFunction = "coalesce" CollectFunction = "collect" SumFunction = "sum" AvgFunction = "avg" MinFunction = "min" MaxFunction = "max" // ITTC - Instant Type; Temporal Component (https://neo4j.com/docs/cypher-manual/current/functions/temporal/) ITTCYear = "year" ITTCMonth = "month" ITTCDay = "day" ITTCHour = "hour" ITTCMinute = "minute" ITTCSecond = "second" ITTCMillisecond = "millisecond" ITTCMicrosecond = "microsecond" ITTCNanosecond = "nanosecond" ITTCTimeZone = "timezone" ITTCEpochSeconds = "epochseconds" ITTCEpochMilliseconds = "epochmillis" )
const ( TokenLiteralAsterisk = "*" QuantifierTypeAll = QuantifierType("all") QuantifierTypeAny = QuantifierType("any") QuantifierTypeNone = QuantifierType("none") QuantifierTypeSingle = QuantifierType("single") QuantifierTypeInvalid = QuantifierType("") SortAscending = SortOrder("asc") SortDescending = SortOrder("desc") OperatorAssignment = AssignmentOperator("=") OperatorAdditionAssignment = AssignmentOperator("+=") OperatorLabelAssignment = AssignmentOperator("") OperatorAdd = Operator("+") OperatorSubtract = Operator("-") OperatorMultiply = Operator("*") OperatorDivide = Operator("/") OperatorModulo = Operator("%") OperatorPowerOf = Operator("^") OperatorEquals = Operator("=") OperatorRegexMatch = Operator("=~") OperatorNotEquals = Operator("<>") OperatorGreaterThan = Operator(">") OperatorGreaterThanOrEqualTo = Operator(">=") OperatorLessThan = Operator("<") OperatorLessThanOrEqualTo = Operator("<=") OperatorStartsWith = Operator("starts with") OperatorEndsWith = Operator("ends with") OperatorContains = Operator("contains") OperatorIn = Operator("in") OperatorIs = Operator("is") OperatorIsNot = Operator("is not") OperatorNot = Operator("not") OperatorAnd = Operator("and") OperatorOr = Operator("or") OperatorInvalid = Operator("") )
Variables ¶
var ErrEmptyPropertyKeyName = errors.New("property key name must not be empty")
var (
GreedyRangeQuantifier = NewRangeQuantifier("*")
)
Functions ¶
func CanEmitBarePropertyKeyName ¶ added in v0.7.0
CanEmitBarePropertyKeyName returns true when a raw property key can be emitted without backticks.
This is specific to Cypher property-key position, such as n.name and {name: value}. Property keys use oC_PropertyKeyName -> oC_SchemaName, where reserved words are valid bare names, unlike variable or parameter symbols. Empty keys and keys containing characters outside the unescaped symbolic-name grammar return false; non-empty keys outside the bare grammar are still representable by EscapePropertyKeyName using backticks.
func Copy ¶
func Copy[T any](value T, extensions ...CopyExtension[T]) T
func EscapePropertyKeyName ¶ added in v0.7.0
EscapePropertyKeyName formats a raw property key as a Cypher property-key token.
func IsEscapedPropertyKeyName ¶ added in v0.7.0
IsEscapedPropertyKeyName returns true when name is wrapped in Cypher backtick delimiters.
func NewRegularQueryWithSingleQuery ¶ added in v0.1.4
func NewRegularQueryWithSingleQuery() (*RegularQuery, *SinglePartQuery)
func UnescapePropertyKeyName ¶ added in v0.7.0
UnescapePropertyKeyName decodes a Cypher property-key token into the raw property key it names.
func ValidatePropertyKeyName ¶ added in v0.7.0
func WithErrors ¶
Types ¶
type ArithmeticExpression ¶
type ArithmeticExpression struct {
Left Expression
Partials []*PartialArithmeticExpression
}
func NewArithmeticExpression ¶
func NewArithmeticExpression() *ArithmeticExpression
func (*ArithmeticExpression) AddArithmeticExpressionPart ¶
func (s *ArithmeticExpression) AddArithmeticExpressionPart(part *PartialArithmeticExpression)
type AssignmentOperator ¶
type AssignmentOperator string
func (AssignmentOperator) String ¶
func (s AssignmentOperator) String() string
type Comparison ¶
type Comparison struct {
Left Expression
Partials []*PartialComparison
}
func NewComparison ¶
func NewComparison(left Expression, operator Operator, right Expression) *Comparison
func (*Comparison) AddPartialComparison ¶
func (s *Comparison) AddPartialComparison(partial *PartialComparison)
func (*Comparison) FirstPartial ¶
func (s *Comparison) FirstPartial() *PartialComparison
func (*Comparison) LastPartial ¶
func (s *Comparison) LastPartial() *PartialComparison
func (*Comparison) NewPartialComparison ¶ added in v0.1.4
func (s *Comparison) NewPartialComparison(operator Operator, rightOperand Expression) *PartialComparison
type Conjunction ¶
type Conjunction struct {
// contains filtered or unexported fields
}
func NewConjunction ¶
func NewConjunction(expressions ...Expression) *Conjunction
func (*Conjunction) Add ¶
func (s *Conjunction) Add(expression Expression)
func (*Conjunction) AddSlice ¶
func (s *Conjunction) AddSlice(expressions []Expression)
func (*Conjunction) Get ¶
func (s *Conjunction) Get(index int) Expression
func (*Conjunction) GetAll ¶
func (s *Conjunction) GetAll() []Expression
func (*Conjunction) IndexOf ¶
func (s *Conjunction) IndexOf(expressionToFind Expression) int
func (*Conjunction) Remove ¶
func (s *Conjunction) Remove(expressionToRemove Expression) bool
func (*Conjunction) Replace ¶
func (s *Conjunction) Replace(index int, expression Expression)
type CopyExtension ¶
type Create ¶
type Create struct {
Unique bool
Pattern []*PatternPart
// contains filtered or unexported fields
}
type Delete ¶
type Delete struct {
Detach bool
Expressions []Expression
}
func NewDelete ¶
func NewDelete(detach bool, expressions []Expression) *Delete
func (*Delete) AddExpression ¶ added in v0.1.4
func (s *Delete) AddExpression(expression Expression)
type Disjunction ¶
type Disjunction struct {
// contains filtered or unexported fields
}
func NewDisjunction ¶
func NewDisjunction(expressions ...Expression) *Disjunction
func (*Disjunction) Add ¶
func (s *Disjunction) Add(expression Expression)
func (*Disjunction) AddSlice ¶
func (s *Disjunction) AddSlice(expressions []Expression)
func (*Disjunction) Get ¶
func (s *Disjunction) Get(index int) Expression
func (*Disjunction) GetAll ¶
func (s *Disjunction) GetAll() []Expression
func (*Disjunction) IndexOf ¶
func (s *Disjunction) IndexOf(expressionToFind Expression) int
func (*Disjunction) Remove ¶
func (s *Disjunction) Remove(expressionToRemove Expression) bool
func (*Disjunction) Replace ¶
func (s *Disjunction) Replace(index int, expression Expression)
type ExclusiveDisjunction ¶
type ExclusiveDisjunction struct {
// contains filtered or unexported fields
}
func NewExclusiveDisjunction ¶
func NewExclusiveDisjunction(expressions ...Expression) *ExclusiveDisjunction
func (*ExclusiveDisjunction) Add ¶
func (s *ExclusiveDisjunction) Add(expression Expression)
func (*ExclusiveDisjunction) AddSlice ¶
func (s *ExclusiveDisjunction) AddSlice(expressions []Expression)
func (*ExclusiveDisjunction) Get ¶
func (s *ExclusiveDisjunction) Get(index int) Expression
func (*ExclusiveDisjunction) GetAll ¶
func (s *ExclusiveDisjunction) GetAll() []Expression
func (*ExclusiveDisjunction) IndexOf ¶
func (s *ExclusiveDisjunction) IndexOf(expressionToFind Expression) int
func (*ExclusiveDisjunction) Remove ¶
func (s *ExclusiveDisjunction) Remove(expressionToRemove Expression) bool
func (*ExclusiveDisjunction) Replace ¶
func (s *ExclusiveDisjunction) Replace(index int, expression Expression)
type Expression ¶
type Expression SyntaxNode
type ExpressionList ¶
type ExpressionList interface {
Add(expression Expression)
AddSlice(expressions []Expression)
Get(index int) Expression
GetAll() []Expression
Len() int
IndexOf(expression Expression) int
Remove(expression Expression) bool
Replace(index int, expression Expression)
}
func NewExpressionList ¶
func NewExpressionList() ExpressionList
func NewExpressionListFromSlice ¶
func NewExpressionListFromSlice(slice []Expression) ExpressionList
type FilterExpression ¶
type FilterExpression struct {
Specifier *IDInCollection
Where *Where
}
func NewFilterExpression ¶
func NewFilterExpression() *FilterExpression
type FunctionInvocation ¶
type FunctionInvocation struct {
Distinct bool
Namespace []string
Name string
Arguments []Expression
// contains filtered or unexported fields
}
func NewSimpleFunctionInvocation ¶
func NewSimpleFunctionInvocation(name string, arguments ...Expression) *FunctionInvocation
func (*FunctionInvocation) AddArgument ¶
func (s *FunctionInvocation) AddArgument(arg Expression)
func (*FunctionInvocation) HasArguments ¶
func (s *FunctionInvocation) HasArguments() bool
func (*FunctionInvocation) NumArguments ¶
func (s *FunctionInvocation) NumArguments() int
type IDInCollection ¶
type IDInCollection struct {
Variable *Variable
Expression Expression
}
func NewIDInCollection ¶
func NewIDInCollection() *IDInCollection
type KindMatcher ¶
type KindMatcher struct {
Reference Expression
Kinds graph.Kinds
// IsExclusive changes the kind matching operator from overlap (PG &&) to a stricter "left contains right" (PG @>)
IsExclusive bool
}
func NewKindMatcher ¶
func NewKindMatcher(reference Expression, kinds graph.Kinds, isExclusive bool) *KindMatcher
type Limit ¶
type Limit struct {
Value Expression
}
type ListLiteral ¶
type ListLiteral []Expression
func NewListLiteral ¶
func NewListLiteral() *ListLiteral
func NewStringListLiteral ¶ added in v0.1.4
func NewStringListLiteral(values []string) *ListLiteral
func (*ListLiteral) Expressions ¶
func (s *ListLiteral) Expressions() []Expression
func (*ListLiteral) Keys ¶
func (s *ListLiteral) Keys() []any
type Literal ¶
Literal is a Cypher AST node representing a literal value (string, integer, float, boolean, list, map, or null).
String values carry a representation contract that callers must respect: when Value holds a string, it must be in Cypher source form, meaning the raw token as it would appear in a query, including the surrounding quote characters (' or ") and with all escape sequences left un-decoded (\\, \', \", \b, \f, \n, \r, \t). Non-ASCII characters are carried as raw UTF-8 bytes inside the literal body. The parser stores string literals in this form so that the AST round-trips back to source verbatim via the format package, and downstream backends (for example the PgSQL translator) decode the source form into the final byte sequence before emitting their target language.
Use NewStringLiteral to construct a string-valued Literal from an arbitrary Go string; it performs the required quoting and escaping. Constructing a Literal directly with a raw, un-quoted Go string in Value will be rejected at translation time.
Non-string values (int, float64, bool, etc.) are stored as-is and are not subject to the source-form contract. Null literals set Null to true and leave Value unused.
func NewLiteral ¶
NewLiteral constructs a Literal wrapping the provided value.
This constructor does not transform value in any way. When passing a string, the caller is responsible for ensuring it is already in Cypher source form (surrounding quotes present, special characters escaped); see the Literal type documentation for the full contract. For arbitrary Go strings, prefer NewStringLiteral, which performs the quoting and escaping for you.
For non-string values (numbers, booleans) value is stored verbatim. To represent a Cypher null, pass null=true.
func NewStringLiteral ¶
NewStringLiteral constructs a string-valued Literal from an arbitrary Go string, producing the Cypher source-form representation required by the Literal contract.
The input is escaped for Cypher single-quoted string literals — every backslash is doubled (\ becomes \\) and every single quote is escaped (' becomes \') — and then wrapped in surrounding single quotes. The resulting Literal.Value is a Cypher source token equivalent to what the parser would have produced for the same input, so it round-trips correctly through emitters and is decoded back to the original byte sequence by translator backends.
Example: NewStringLiteral(`TEST\PS1`) yields Value == `'TEST\\PS1'`.
type MapItem ¶
type MapItem struct {
Key string
Value Expression
}
type MapLiteral ¶
type MapLiteral map[string]Expression
func NewMapLiteral ¶
func NewMapLiteral() MapLiteral
func (MapLiteral) ForEachItem ¶ added in v0.6.0
func (s MapLiteral) ForEachItem(delegate func(key string, value Expression) error) error
func (MapLiteral) Items ¶
func (s MapLiteral) Items() []*MapItem
func (MapLiteral) Keys ¶
func (s MapLiteral) Keys() []any
type Match ¶
type Match struct {
Optional bool
Pattern []*PatternPart
Where *Where
}
func (*Match) FirstRelationshipPattern ¶
func (s *Match) FirstRelationshipPattern() *RelationshipPattern
func (*Match) NewPatternPart ¶ added in v0.1.4
func (s *Match) NewPatternPart() *PatternPart
type Merge ¶
type Merge struct {
PatternPart *PatternPart
MergeActions []*MergeAction
}
type MergeAction ¶
type MultiPartQuery ¶
type MultiPartQuery struct {
Parts []*MultiPartQueryPart
SinglePartQuery *SinglePartQuery
}
func NewMultiPartQuery ¶
func NewMultiPartQuery() *MultiPartQuery
func (*MultiPartQuery) AppendPart ¶
func (s *MultiPartQuery) AppendPart()
func (*MultiPartQuery) CurrentPart ¶
func (s *MultiPartQuery) CurrentPart() *MultiPartQueryPart
type MultiPartQueryPart ¶
type MultiPartQueryPart struct {
ReadingClauses []*ReadingClause
UpdatingClauses []*UpdatingClause
With *With
}
func NewMultiPartQueryPart ¶
func NewMultiPartQueryPart() *MultiPartQueryPart
func (*MultiPartQueryPart) AddReadingClause ¶
func (s *MultiPartQueryPart) AddReadingClause(clause *ReadingClause)
func (*MultiPartQueryPart) AddUpdatingClause ¶
func (s *MultiPartQueryPart) AddUpdatingClause(clause *UpdatingClause)
type Negation ¶
type Negation struct {
Expression Expression
}
func NewNegation ¶
func NewNegation(expression Expression) *Negation
type NodePattern ¶
type NodePattern struct {
Variable *Variable
Kinds graph.Kinds
Properties Expression
}
NodePattern
func (*NodePattern) AddKind ¶
func (s *NodePattern) AddKind(kind graph.Kind)
type Parameter ¶
func NewParameter ¶
type Parenthetical ¶
type Parenthetical struct {
Expression Expression
}
func NewParenthetical ¶
func NewParenthetical(expression Expression) *Parenthetical
type PartialArithmeticExpression ¶
type PartialArithmeticExpression struct {
Operator Operator
Right Expression
}
func NewArithmeticExpressionPart ¶
func NewArithmeticExpressionPart(operator Operator) *PartialArithmeticExpression
type PartialComparison ¶
type PartialComparison struct {
Operator Operator
Right Expression
}
func NewPartialComparison ¶ added in v0.1.4
func NewPartialComparison(operator Operator, right Expression) *PartialComparison
type PatternElement ¶
type PatternElement struct {
Element Expression
}
func (*PatternElement) AsNodePattern ¶
func (s *PatternElement) AsNodePattern() (*NodePattern, bool)
func (*PatternElement) AsRelationshipPattern ¶
func (s *PatternElement) AsRelationshipPattern() (*RelationshipPattern, bool)
func (*PatternElement) IsNodePattern ¶
func (s *PatternElement) IsNodePattern() bool
func (*PatternElement) IsRelationshipPattern ¶
func (s *PatternElement) IsRelationshipPattern() bool
type PatternPart ¶
type PatternPart struct {
Variable *Variable
ShortestPathPattern bool
AllShortestPathsPattern bool
PatternElements []*PatternElement
}
func NewPatternPart ¶
func NewPatternPart() *PatternPart
func (*PatternPart) AddPatternElements ¶
func (s *PatternPart) AddPatternElements(nextElements ...Expression) *PatternPart
func (*PatternPart) CurrentElement ¶
func (s *PatternPart) CurrentElement() any
type PatternPredicate ¶
type PatternPredicate struct {
PatternElements []*PatternElement
}
func NewPatternPredicate ¶
func NewPatternPredicate() *PatternPredicate
func (*PatternPredicate) AddElement ¶
func (s *PatternPredicate) AddElement(element Expression)
type PatternRange ¶
func NewPatternRange ¶
func NewPatternRange(start, end *int64) *PatternRange
type Projection ¶
type Projection struct {
Distinct bool
All bool
Order *Order
Skip *Skip
Limit *Limit
Items []Expression
}
func NewProjection ¶
func NewProjection(distinct bool) *Projection
func (*Projection) AddItem ¶
func (s *Projection) AddItem(item *ProjectionItem)
type ProjectionItem ¶
type ProjectionItem struct {
Expression Expression
Alias *Variable
}
func NewGreedyProjectionItem ¶
func NewGreedyProjectionItem() *ProjectionItem
func NewProjectionItem ¶
func NewProjectionItem() *ProjectionItem
func NewProjectionItemWithExpr ¶ added in v0.1.4
func NewProjectionItemWithExpr(expr Expression) *ProjectionItem
type Properties ¶
type Properties struct {
Map MapLiteral
Parameter *Parameter
}
func NewProperties ¶
func NewProperties() *Properties
type PropertyLookup ¶
type PropertyLookup struct {
Atom Expression
// Symbol is the raw property key, not an already-rendered Cypher token.
// Callers should not pre-wrap names in backticks; formatting handles that.
Symbol string
}
func NewPropertyLookup ¶
func NewPropertyLookup(variableSymbol string, propertySymbol string) *PropertyLookup
func (*PropertyLookup) SetSymbol ¶
func (s *PropertyLookup) SetSymbol(symbol string)
type Quantifier ¶
type Quantifier struct {
Type QuantifierType
Filter *FilterExpression
}
func NewQuantifier ¶
func NewQuantifier(quantifierType QuantifierType) *Quantifier
type QuantifierType ¶
type QuantifierType string
func (QuantifierType) String ¶
func (s QuantifierType) String() string
type RangeQuantifier ¶
type RangeQuantifier struct {
Value string
}
func NewRangeQuantifier ¶
func NewRangeQuantifier(value string) *RangeQuantifier
type ReadingClause ¶
func NewReadingClause ¶
func NewReadingClause() *ReadingClause
func (*ReadingClause) NewMatch ¶ added in v0.1.4
func (s *ReadingClause) NewMatch(optional bool) *Match
type RegularQuery ¶
type RegularQuery struct {
SingleQuery *SingleQuery
}
func NewRegularQuery ¶
func NewRegularQuery() *RegularQuery
type RelationshipPattern ¶
type RelationshipPattern struct {
Variable *Variable
Kinds graph.Kinds
Direction graph.Direction
Range *PatternRange
Properties Expression
}
RelationshipPattern
func (*RelationshipPattern) AddKind ¶
func (s *RelationshipPattern) AddKind(kind graph.Kind)
type Remove ¶
type Remove struct {
Items []*RemoveItem
}
func NewRemove ¶
func NewRemove(items []*RemoveItem) *Remove
type RemoveItem ¶
type RemoveItem struct {
KindMatcher *KindMatcher
Property Expression
}
func RemoveKindsByMatcher ¶ added in v0.1.4
func RemoveKindsByMatcher(kindMatcher *KindMatcher) *RemoveItem
func RemoveProperty ¶ added in v0.1.4
func RemoveProperty(propertyLookup Expression) *RemoveItem
type Return ¶
type Return struct {
Projection *Projection
}
func (*Return) NewProjection ¶ added in v0.1.4
func (s *Return) NewProjection(distinct bool) *Projection
type SetItem ¶
type SetItem struct {
Left Expression
Operator AssignmentOperator
Right Expression
}
func NewSetItem ¶
func NewSetItem(lOperand Expression, operator AssignmentOperator, rOperand Expression) *SetItem
type SinglePartQuery ¶
type SinglePartQuery struct {
ReadingClauses []*ReadingClause
UpdatingClauses []Expression
Return *Return
// contains filtered or unexported fields
}
func NewSinglePartQuery ¶
func NewSinglePartQuery() *SinglePartQuery
func (*SinglePartQuery) AddReadingClause ¶
func (s *SinglePartQuery) AddReadingClause(clause *ReadingClause)
func (*SinglePartQuery) AddUpdatingClause ¶
func (s *SinglePartQuery) AddUpdatingClause(clause *UpdatingClause)
func (*SinglePartQuery) NewMatch ¶ added in v0.1.4
func (s *SinglePartQuery) NewMatch(optional bool) *Match
func (*SinglePartQuery) NewProjection ¶ added in v0.1.4
func (s *SinglePartQuery) NewProjection(distinct bool) *Projection
func (*SinglePartQuery) NewReadingClause ¶ added in v0.1.4
func (s *SinglePartQuery) NewReadingClause() *ReadingClause
type SingleQuery ¶
type SingleQuery struct {
SinglePartQuery *SinglePartQuery
MultiPartQuery *MultiPartQuery
}
func NewSingleQuery ¶
func NewSingleQuery() *SingleQuery
type SortItem ¶
type SortItem struct {
Ascending bool
Expression Expression
}
type SyntaxNode ¶
type SyntaxNode any
type UnaryAddOrSubtractExpression ¶
type UnaryAddOrSubtractExpression struct {
Operator Operator
Right Expression
}
func NewUnaryAddOrSubtractExpression ¶
func NewUnaryAddOrSubtractExpression() *UnaryAddOrSubtractExpression
type Unwind ¶
type Unwind struct {
Expression Expression
Variable *Variable
}
type UpdatingClause ¶
type UpdatingClause struct {
Clause Expression
// contains filtered or unexported fields
}
func NewUpdatingClause ¶
type Variable ¶
type Variable struct {
Symbol string
}
func NewVariable ¶
func NewVariable() *Variable
func NewVariableWithSymbol ¶
type Where ¶
type Where struct {
// contains filtered or unexported fields
}
func (*Where) Add ¶
func (s *Where) Add(expression Expression)
func (*Where) AddSlice ¶
func (s *Where) AddSlice(expressions []Expression)
func (*Where) Get ¶
func (s *Where) Get(index int) Expression
func (*Where) GetAll ¶
func (s *Where) GetAll() []Expression
func (*Where) IndexOf ¶
func (s *Where) IndexOf(expressionToFind Expression) int
func (*Where) Remove ¶
func (s *Where) Remove(expressionToRemove Expression) bool
func (*Where) Replace ¶
func (s *Where) Replace(index int, expression Expression)