Source File
gqlparser.go
Belonging Package
github.com/pancsta/gochickpeas/gql/gqlparser
// Package gqlparser is a thin public re-export of the GQL parser front-end// (gql/internal/parser and gql/internal/ast), which Go forbids importing// from outside this module. It is the only fork-specific addition and holds// no engine logic: Parse and Desugar delegate to the upstream packages, and// the names below are type aliases, so values are interchangeable with the// internal ones.//// Consumers wanting only syntax (no chickpeas store) build their own// binder/executor on top of Parse + Desugar.package gqlparserimport ()// Parse parses one GQL statement into an AST.func ( string) (*Query, error) {return parser.Parse()}// Query modes.const (Run = ast.RunExplain = ast.ExplainProfile = ast.Profile)// Union kinds.const (UnionDistinct = ast.UnionDistinctUnionAll = ast.UnionAllUnionExcept = ast.UnionExceptUnionIntersect = ast.UnionIntersect)// Relationship directions.const (DirOut = ast.DirOutDirIn = ast.DirInDirBoth = ast.DirBoth)// Label expression kinds.const (LabelName = ast.LabelNameLabelAnd = ast.LabelAndLabelOr = ast.LabelOrLabelNot = ast.LabelNotLabelWild = ast.LabelWild)// Cost kinds.const (CostProperty = ast.CostPropertyCostConstant = ast.CostConstantCostExpr = ast.CostExpr)// Unary operators.const (Not = ast.NotNeg = ast.Neg)// Binary operators.const (OpOr = ast.OpOrOpAnd = ast.OpAndOpEq = ast.OpEqOpNeq = ast.OpNeqOpLt = ast.OpLtOpLte = ast.OpLteOpGt = ast.OpGtOpGte = ast.OpGteOpAdd = ast.OpAddOpSub = ast.OpSubOpMul = ast.OpMulOpDiv = ast.OpDivOpStartsWith = ast.OpStartsWithOpEndsWith = ast.OpEndsWithOpContains = ast.OpContainsOpXor = ast.OpXorOpConcat = ast.OpConcat)// Literal kinds.const (LitInt = ast.LitIntLitFloat = ast.LitFloatLitStr = ast.LitStrLitBool = ast.LitBoolLitNull = ast.LitNullLitParam = ast.LitParamLitNamedParam = ast.LitNamedParam)// List-predicate quantifiers.const (QuantAll = ast.QuantAllQuantAny = ast.QuantAnyQuantNone = ast.QuantNoneQuantSingle = ast.QuantSingle)// Map-projection entry kinds.const (MapProjProp = ast.MapProjPropMapProjField = ast.MapProjFieldMapProjAll = ast.MapProjAll)// Query and clause AST nodes.type (QueryMode = ast.QueryModeUnionKind = ast.UnionKindQuery = ast.QueryQueryPart = ast.QueryPartClause = ast.ClauseMatch = ast.MatchWith = ast.WithShortestPath = ast.ShortestPathCallProc = ast.CallProcYieldItem = ast.YieldItemPathBind = ast.PathBindUnwind = ast.UnwindCallSubquery = ast.CallSubqueryProjection = ast.ProjectionReturnItem = ast.ReturnItemSortItem = ast.SortItemPattern = ast.PatternPatternHop = ast.PatternHopNodePat = ast.NodePatPropEntry = ast.PropEntryPropExprEntry = ast.PropExprEntryLabelKind = ast.LabelKindLabelExpr = ast.LabelExprDir = ast.DirRelPat = ast.RelPatVarLength = ast.VarLengthCostKind = ast.CostKindCostSpec = ast.CostSpec)// Expression AST nodes.type (Expr = ast.ExprLit = ast.LitVar = ast.VarProp = ast.PropUnary = ast.UnaryBinary = ast.BinaryFunc = ast.FuncListExpr = ast.ListExprIn = ast.InIsNull = ast.IsNullIsTruth = ast.IsTruthIsTyped = ast.IsTypedCaseWhen = ast.CaseWhenCase = ast.CaseCost = ast.CostExists = ast.ExistsCountSub = ast.CountSubQuant = ast.QuantListPred = ast.ListPredReduce = ast.ReduceListComp = ast.ListCompPatternComp = ast.PatternCompIndex = ast.IndexSlice = ast.SlicePropOf = ast.PropOfMapProjEntryKind = ast.MapProjEntryKindMapProjEntry = ast.MapProjEntryMapProj = ast.MapProjMapField = ast.MapFieldMapLit = ast.MapLitHasLabelExpr = ast.HasLabelExprUnOp = ast.UnOpBinOp = ast.BinOpLitKind = ast.LitKindLiteral = ast.Literal)// Literal constructors.// IntLit returns an integer literal.func ( int64) Literal { return ast.IntLit() }// FloatLit returns a float literal.func ( float64) Literal { return ast.FloatLit() }// StrLit returns a string literal.func ( string) Literal { return ast.StrLit() }// BoolLit returns a boolean literal.func ( bool) Literal { return ast.BoolLit() }// NullLit returns the null literal.func () Literal { return ast.NullLit() }// ParamLit returns an auto-lifted parameter slot literal.func ( uint32) Literal { return ast.ParamLit() }// NamedParamLit returns a named parameter literal.func ( string) Literal { return ast.NamedParamLit() }
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |