Traqula
    Preparing search index...

    A factory that helps you create, and check types for AST nodes for SPARQL 1.2

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    aggregate alwaysSparql11 annotatedTriple contextDefinitionBase contextDefinitionPrefix contextDefinitionVersion datasetClauses dematerialized expressionFunctionCall expressionOperation expressionPatternOperation forcedAutoGenTree forceMaterialized formatOperator gen graphNodeIdentifier graphQuads graphRefAll graphRefDefault graphRefNamed graphRefSpecific isContextDefinitionBase isContextDefinitionPrefix isContextDefinitionVersion isDatasetClauses isExpression isExpressionAggregate isExpressionAggregateDefault isExpressionAggregateOnWildcard isExpressionAggregateSeparator isExpressionFunctionCall isExpressionOperator isExpressionPatternOperation isExpressionPure isGraphQuads isGraphRef isGraphRefAll isGraphRefDefault isGraphRefNamed isGraphRefSpecific isLocalized isOfSubType isOfType isPath isPathAlternativeLimited isPathChain isPathModified isPathNegated isPathNegatedElt isPathOfType isPathPure isPattern isPatternBgp isPatternBind isPatternFilter isPatternGraph isPatternGroup isPatternMinus isPatternOptional isPatternService isPatternUnion isPatternValues isPrintingLoc isQuery isQueryAsk isQueryConstruct isQueryDescribe isQuerySelect isSolutionModifier isSolutionModifierGroup isSolutionModifierHaving isSolutionModifierLimitOffset isSolutionModifierOrder isSourceLocation isSourceLocationInlinedSource isSourceLocationNodeAutoGenerate isSourceLocationNodeReplace isSourceLocationNoMaterialize isSourceLocationSource isSourceLocationStringReplace isTerm isTermBlank isTermLiteral isTermLiteralLangStr isTermLiteralStr isTermLiteralTyped isTermNamed isTermNamedPrefixed isTermTriple isTermVariable isTriple isTripleCollection isTripleCollectionBlankNodeProperties isTripleCollectionList isTripleCollectionReifiedTriple isUpdate isUpdateOperation isUpdateOperationAdd isUpdateOperationClear isUpdateOperationCopy isUpdateOperationCreate isUpdateOperationDeleteData isUpdateOperationDeleteWhere isUpdateOperationDrop isUpdateOperationInsertData isUpdateOperationLoad isUpdateOperationModify isUpdateOperationMove isWildcard path patternBgp patternBind patternFilter patternGraph patternGroup patternMinus patternOptional patternService patternUnion patternValues printFilter queryConstruct querySelect resetBlankNodeCounter safeObjectTransform solutionModifierGroup solutionModifierHaving solutionModifierLimitOffset solutionModifierOrder sourceLocation sourceLocationInlinedSource sourceLocationNodeReplace sourceLocationNodeReplaceUnsafe sourceLocationNoMaterialize sourceLocationSource sourceLocationStringReplace termBlank termLiteral termNamed termTriple termVariable tripleCollectionBlankNodeProperties tripleCollectionList tripleCollectionReifiedTriple updateOperationAdd updateOperationAddMoveCopy updateOperationClear updateOperationClearDrop updateOperationCopy updateOperationCreate updateOperationDeleteData updateOperationDeleteWhere updateOperationDrop updateOperationInsDelDataWhere updateOperationInsertData updateOperationLoad updateOperationModify updateOperationMove wildcard wrap

    Constructors

    Properties

    __blankNodeCounter: number
    tracksSourceLocation: boolean

    Whether this AstFactory will track source location. Default: true. In case source location is not tracked, each generated node using this factory will be SourceLocationNodeAutoGenerate

    triple: (
        subject: GraphNode,
        predicate:
            | TermIriFull
            | TermIriPrefixed
            | TermVariable
            | PropertyPathChain
            | PathModified
            | PathNegated,
        object: GraphNode,
        loc?: SourceLocation,
    ) => TripleNesting = ...

    Overwritten triple constructor to always contain an empty annotations list

    Methods

    • Returns a copy of the argument that is not materialized

      Type Parameters

      Parameters

      • arg: T

      Returns T

    • Type Parameters

      Parameters

      Returns Node & { subType: string; type: "expression" } & {
          args: Expression[];
          operator: string;
          subType: "operation";
      } & { args: Args }

    • Given a (AST) tree, return a copy of that tree where it and it's descendents all have a SourceLocationNodeAutoGenerate localization.

      Type Parameters

      • T extends object

      Parameters

      • obj: T

      Returns T

    • In case the provided Node is not yet materialized, force it to be autoGenerated.

      Type Parameters

      Parameters

      • arg: T

      Returns T

    • Parameters

      • operator: string

      Returns string

    • Parameters

      • contextDef: object

      Returns contextDef is SubTyped<"contextDef", "base">

    • Parameters

      • contextDef: object

      Returns contextDef is SubTyped<"contextDef", "prefix">

    • Parameters

      • obj: object

      Returns obj is Typed<"datasetClauses">

    • Parameters

      • obj: object

      Returns obj is
          | Typed<"expression">
          | SubTyped<"term", "variable" | "literal" | "namedNode">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"expression", "aggregate">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"expression", "aggregate"> & { expression: [Typed<"wildcard">] }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"expression", "aggregate"> & { separator: string }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"expression", "functionCall">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"expression", "operation">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"expression", "patternOperation">

    • Parameters

      • obj: object

      Returns obj is Typed<"expression">

    • Parameters

      • obj: object

      Returns obj is Typed<"graphRef">

    • Parameters

      • graphRef: object

      Returns graphRef is SubTyped<"graphRef", "all">

    • Parameters

      • graphRef: object

      Returns graphRef is SubTyped<"graphRef", "default">

    • Parameters

      • graphRef: object

      Returns graphRef is SubTyped<"graphRef", "named">

    • Parameters

      • graphRef: object

      Returns graphRef is SubTyped<"graphRef", "specific">

    • Whether the provided value is an object that tracks source location.

      Parameters

      • obj: unknown

      Returns obj is Localized

    • Guard to check if an object is the specified Type: Typed.

      Type Parameters

      • Type extends string

      Parameters

      • obj: object
      • type: Type

      Returns obj is Typed<Type>

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "namedNode"> | Typed<"path">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"path", "|"> & {
          items: (
              | SubTyped<"term", "namedNode">
              | SubTyped<"path", "^"> & { items: [SubTyped<"term", "namedNode">] }
          )[];
      }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"path", "|" | "/">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"path", "?" | "*" | "+" | "^">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"path", "!">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"path", "^"> & { items: [SubTyped<"term", "namedNode">] }

    • Type Parameters

      • T extends U[]
      • U extends string

      Parameters

      • obj: object
      • subTypes: T

      Returns obj is SubTyped<"path", U>

    • Parameters

      • obj: object

      Returns obj is Typed<"path">

    • Parameters

      • obj: object

      Returns obj is Typed<"pattern">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "bgp">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "bind">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "filter">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "graph">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "group">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "minus">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "optional">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "service">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "union">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"pattern", "values">

    • Parameters

      • obj: object

      Returns obj is Typed<"query">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"query", "ask">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"query", "construct">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"query", "describe">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"query", "select">

    • Parameters

      • obj: object

      Returns obj is Typed<"solutionModifier">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"solutionModifier", "group">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"solutionModifier", "having">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"solutionModifier", "limitOffset">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"solutionModifier", "order">

    • Parameters

      • x: object

      Returns x is Typed<"term">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "blankNode">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "literal">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "literal"> & { langOrIri: string }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "literal"> & { langOrIri: undefined }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "literal"> & {
          langOrIri: SubTyped<"term", "namedNode">;
      }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "namedNode">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "namedNode"> & { prefix: string }

    • Parameters

      • obj: object

      Returns obj is SubTyped<"term", "variable">

    • Parameters

      • obj: object

      Returns obj is Typed<"triple">

    • Parameters

      • obj: object

      Returns obj is Typed<"tripleCollection">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"tripleCollection", "blankNodeProperties">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"tripleCollection", "list">

    • Parameters

      • obj: object

      Returns obj is Update

    • Parameters

      • obj: object

      Returns obj is Typed<"updateOperation">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "add">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "clear">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "copy">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "create">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "deletedata">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "deletewhere">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "drop">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "insertdata">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "load">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "modify">

    • Parameters

      • obj: object

      Returns obj is SubTyped<"updateOperation", "move">

    • Parameters

      • obj: object

      Returns obj is Typed<"wildcard">

    • A simple filter that will only execute the provided callback when the provided SourceLocation expects the generator steps to autoGenerate.

      Parameters

      Returns void

    • Given a value and some mapper from objects to objects, map all containing items in case it is an array, otherwise map the provided value in case it is an object, finally, do nothing.

      Parameters

      • value: unknown

        the value to map

      • mapper: (some: object) => any

        the function mapping an object to another object.

      Returns any

    • Create a SourceLocation that indicates a given range of the current range should be replaced by a new source.

      Parameters

      • newSource: string
      • subLoc: SourceLocation
      • start: number
      • end: number
      • OptionalstartOnNew: number
      • OptionalendOnNew: number

      Returns SourceLocation

    • Create a SourceLocation that indicates this node, representing a range of characters in the original string, should be replaced by some string during generation.

      Parameters

      • newSource: string
      • start: number
      • end: number

      Returns SourceLocation

    • Wrap any type into an object that tracks the source location of tha value.

      Type Parameters

      • T

      Parameters

      • val: T

        the value to wrap

      • loc: SourceLocation

        the source location for that value

      Returns Wrap<T>