Versions in this module Expand all Collapse all v3 v3.1.0 Jun 22, 2025 v3.0.38 Sep 6, 2024 v3.0.37 Sep 6, 2024 v3.0.36 Sep 6, 2024 v3.0.35 Sep 6, 2024 v3.0.34 Sep 6, 2024 Changes in this version + var ErrUnknownValidator = errors.New("unknown validator") + type AggregrateOp int8 + const AgAvg + const AgCount + const AgMax + const AgMin + const AgSum + func (i AggregrateOp) String() string + type Arg struct + Col sdata.DBColumn + DType string + Name string + Type ArgType + Val string + type ArgType int8 + const ArgTypeCol + const ArgTypeVal + const ArgTypeVar + type Cache struct + Header string + type ColKey struct + Base bool + Name string + type Column struct + Col sdata.DBColumn + FieldFilter Filter + FieldName string + type Compiler struct + func NewCompiler(s *sdata.DBSchema, c Config) (*Compiler, error) + func (co *Compiler) AddRole(role, schema, table string, trc TRConfig) error + func (co *Compiler) Compile(query []byte, vmap map[string]json.RawMessage, role, namespace string) (qc *QCode, err error) + func (co *Compiler) Find(schema, name string) (sdata.DBTable, error) + func (co *Compiler) FindPath(from, to, through string) ([]sdata.TPath, error) + func (co *Compiler) ParseName(name string) string + type Config struct + DBSchema string + DefaultBlock bool + DefaultLimit int + DisableAgg bool + DisableFuncs bool + EnableCamelcase bool + TConfig map[string]TConfig + Validators map[string]Validator + Vars map[string]string + type Constraint struct + VarName string + type DeleteConfig struct + Block bool + Columns []string + Filters []string + type Exp struct + Children []*Exp + Joins []Join + Left struct{ ... } + Op ExpOp + OrderBy bool + Right struct{ ... } + type ExpOp int8 + const OpAnd + const OpContainedIn + const OpContains + const OpDistinct + const OpEquals + const OpEqualsTrue + const OpFalse + const OpGreaterOrEquals + const OpGreaterThan + const OpHasInCommon + const OpHasKey + const OpHasKeyAll + const OpHasKeyAny + const OpILike + const OpIRegex + const OpIn + const OpIsNotNull + const OpIsNull + const OpLesserOrEquals + const OpLesserThan + const OpLike + const OpNop + const OpNot + const OpNotDistinct + const OpNotEquals + const OpNotEqualsTrue + const OpNotILike + const OpNotIRegex + const OpNotIn + const OpNotLike + const OpNotRegex + const OpNotSimilar + const OpOr + const OpRegex + const OpSelectExists + const OpSimilar + const OpTsQuery + func (i ExpOp) String() string + type Field struct + Args []Arg + Col sdata.DBColumn + FieldFilter Filter + FieldName string + Func sdata.DBFunction + ID int32 + ParentID int32 + SkipRender SkipType + Type FieldType + type FieldType int8 + const FieldTypeCol + const FieldTypeFunc + const FieldTypeTable + func (i FieldType) String() string + type Filter struct + type Fragment struct + Name string + Value []byte + type Function struct + Agg bool + Args []Arg + Func sdata.DBFunction + Name string + type InsertConfig struct + Block bool + Columns []string + Presets map[string]string + type Join struct + Filter *Exp + Local bool + Rel sdata.DBRel + type MColumn struct + Alias string + Col sdata.DBColumn + FieldName string + Set bool + Value string + type MRColumn struct + Col sdata.DBColumn + VCol sdata.DBColumn + type MTable struct + Ti sdata.DBTable + type MType uint8 + const MTConnect + const MTDelete + const MTDisconnect + const MTInsert + const MTKeyword + const MTNone + const MTUpdate + const MTUpsert + func (i MType) String() string + type Mutate struct + Cols []MColumn + DependsOn map[int32]struct{} + ID int32 + Key string + Multi bool + ParentID int32 + Path []string + RCols []MRColumn + Rel sdata.DBRel + Ti sdata.DBTable + Type MType + Val json.RawMessage + Where Filter + type NewValidFn func(args []string) (fn ValidFn, err error) + type Order int8 + const OrderAsc + const OrderAscNullsFirst + const OrderAscNullsLast + const OrderDesc + const OrderDescNullsFirst + const OrderDescNullsLast + const OrderNone + func (o Order) String() string + type OrderBy struct + Col sdata.DBColumn + Key string + KeyVar string + Order Order + Var string + type Paging struct + Cursor bool + Limit int32 + LimitVar string + NoLimit bool + Offset int32 + OffsetVar string + Type PagingType + type PagingType int8 + const PTBackward + const PTForward + const PTOffset + func (i PagingType) String() string + type QCode struct + ActionVal json.RawMessage + ActionVar string + Cache Cache + Consts []Constraint + Fragments []Fragment + MUnions map[string][]int32 + Mutates []Mutate + Name string + Query []byte + Remotes int32 + Roots []int32 + SType QType + Schema *sdata.DBSchema + Selects []Select + Type QType + Typename bool + Vars []Var + func (qc *QCode) ProcessConstraints(vmap map[string]json.RawMessage) (errs []ValidErr) + type QType int8 + const QTDelete + const QTInsert + const QTMutation + const QTQuery + const QTSubscription + const QTUnknown + const QTUpdate + const QTUpsert + func GetQType(t graph.ParserType) QType + func GetQTypeByName(t string) QType + func (i QType) String() string + type QueryConfig struct + Block bool + Columns []string + DisableFunctions bool + Filters []string + Limit int + type Schema struct + Columns []sdata.DBColumn + Functions []sdata.DBFunction + Schema string + Type string + Version int + func ParseSchema(b []byte) (ds Schema, err error) + type Script struct + Name string + Source string + type SelType int8 + const SelTypeMember + const SelTypeNone + const SelTypeUnion + func (i SelType) String() string + type Select struct + BCols []Column + Children []int32 + DistinctOn []sdata.DBColumn + Fields []Field + GroupCols bool + IArgs []Arg + Joins []Join + OrderBy []OrderBy + Paging Paging + Rel sdata.DBRel + Schema string + Singular bool + Table string + Ti sdata.DBTable + Type SelType + Typename bool + Where Filter + func (sel *Select) GetInternalArg(name string) (Arg, bool) + type SkipType int8 + const SkipTypeBlocked + const SkipTypeDrop + const SkipTypeNone + const SkipTypeNulled + const SkipTypeRemote + const SkipTypeUserNeeded + func (i SkipType) String() string + type TConfig struct + OrderBy map[string][][2]string + type TRConfig struct + Delete DeleteConfig + Insert InsertConfig + Query QueryConfig + Update UpdateConfig + Upsert UpsertConfig + type TableInfo struct + type UpdateConfig struct + Block bool + Columns []string + Filters []string + Presets map[string]string + type UpsertConfig struct + Block bool + Columns []string + Filters []string + Presets map[string]string + type ValType int8 + const ValBool + const ValList + const ValNum + const ValObj + const ValStr + const ValVar + func (i ValType) String() string + type ValidErr struct + Constraint string + FieldName string + type ValidFn func(Vars, Constraint) bool + type Validation struct + Source string + Type string + type Validator struct + Description string + List bool + NewFn NewValidFn + Type string + Types []graph.ParserType + type Var struct + Name string + Val json.RawMessage + type Vars map[string]json.RawMessage Other modules containing this package github.com/dosco/graphjin github.com/dosco/graphjin/v2