Options
All
  • Public
  • Public/Protected
  • All
Menu

odatafy-parser

Index

Type Aliases

CaseFuncArg: { cond: FilterNode; value: FuncArg }

Type declaration

CollectionNode: { collection: SpatialNode[]; nodeType: CollectionNode; srid?: number }

Type declaration

ComputeItemNode: { commonExpr: FilterNode; computeIdentifier: string; nodeType: ComputeItemNode }

Type declaration

ComputeNode: { nodeType: ComputeNode; value: ComputeItemNode[] }

Compute Parser Nodes

Type declaration

ConstantNode: { nodeType: ConstantNode; type: ConstantNodeTypes; value: any }

General nodes

Type declaration

ConstantSpatialNode: { abstractSpatialType: ConstantSpatialNodeAbstractSpatialTypes; nodeType: ConstantSpatialNode; value: SpatialNode }

Type declaration

EnumValueNode: { enumTypeName?: string; enumValue: string; nodeType: EnumValueNode; type: "EnumValue" }

Type declaration

  • Optional enumTypeName?: string
  • enumValue: string
  • nodeType: EnumValueNode
  • type: "EnumValue"
ExpandIdentifierNode: { flag?: ExpandIdentifierFlags; nodeType: ExpandIdentifierNode; value: string }

ExpandIdentifierNodes are representing an Identifier each

$expand=Name,namespace.name,@Measures.currency

=> Would create an ExpandIdentifierNode inside an ExpandPathNode for Name and namespace.name and a ExpandIdentifierNode with the flag set for @Measures.currency

=> Flag will be set if the identifier is a annotation (@)

Type declaration

ExpandNode: { nodeType: ExpandNode; value: (ExpandPathNode | ExpandPathNodeWithOptions)[] }

ExpandNodes are representing a $expand

$expand=...

=> Would create an ExpandNode

Type declaration

ExpandOptions: { aliasAndValue?: any; compute?: ComputeNode; count?: any; expand?: ExpandNode; filter?: FilterNode; levels?: number | "max"; orderby?: OrderbyNode; search?: any; select?: SelectNode; skip?: number; top?: number }

ExpandOptions are representing ExpandOptions

$expand=Name($top=4)

=> Would create an ExpandIdentifierNode inside a ExpandPathNodeWithOptions for Name

Type declaration

  • Optional aliasAndValue?: any
  • Optional compute?: ComputeNode
  • Optional count?: any
  • Optional expand?: ExpandNode
  • Optional filter?: FilterNode
  • Optional levels?: number | "max"
  • Optional orderby?: OrderbyNode
  • Optional search?: any
  • Optional select?: SelectNode
  • Optional skip?: number
  • Optional top?: number
ExpandOptionsUnprocessedNode: { nodeType: ExpandOptionsUnprocessedNode; type: "default" | "ref" | "count"; value: string }

for internal processing

Type declaration

ExpandPathNode: { nodeType: ExpandPathNode; value: ExpandItemNode[] }

ExpandPathNodes are representing one expandItem (seperated by comma) each

$expand=Name,Adress/Street

=> Would create two ExpandPathNodes

Type declaration

ExpandPathNodeWithOptions: { nodeType: ExpandPathNodeWithOptions; optionType: "default" | "ref" | "count"; options: ExpandOptionsUnprocessedNode | ExpandOptions; value: ExpandItemNode[] }

ExpandPathNodeWithOptions are representing one expandItem (seperated by comma) each, that have options

$expand=Name,Adress/Street($top=5)

=> Would create an ExpandPathNode for Name and an ExpandPathNodeWithOptions for Adress/Street($top=5)

Type declaration

ExpandStarNode: { nodeType: ExpandStarNode; options: { levels?: number | "max"; ref?: boolean } }

ExpandStarNodes are representing Wildcards

$expand=*,*\/$ref,*($levels=2)

=> Would create an ExpandStarNode inside an ExpandPathNode for each of the three expressions

Type declaration

  • nodeType: ExpandStarNode
  • options: { levels?: number | "max"; ref?: boolean }
    • Optional levels?: number | "max"
    • Optional ref?: boolean
ExpandValueNode: { nodeType: ExpandValueNode }

ExpandValueNodes are representing $value

$expand=$value

=> Would create an ExpandValueNode inside an ExpandPathNode

Type declaration

Filter parser node

FuncNode0Args: { func: FuncNames0Args; nodeType: FuncNode0Args }

Type declaration

FuncNode1Args: { args: [FuncArg]; func: FuncNames1Args; nodeType: FuncNode1Args }

Type declaration

FuncNode2Args: { args: [FuncArg, FuncArg]; func: FuncNames2Args; nodeType: FuncNode2Args }

Type declaration

FuncNodeCase: { args: CaseFuncArg[]; nodeType: FuncNodeCase }

Type declaration

FuncNodeVarArgs: { args: FuncArg[]; func: FuncNamesVarArgs; nodeType: FuncNodeVarArgs }

Type declaration

LineStringNode: { nodeType: LineStringNode; positions: PositionLiteral[]; srid?: number }

Type declaration

MultiLineStringNode: { lineStrings: LineStringNode[]; nodeType: MultiLineStringNode; srid?: number }

Type declaration

MultiPointNode: { nodeType: MultiPointNode; points: PositionLiteral[]; srid?: number }

Type declaration

MultiPolygonNode: { nodeType: MultiPolygonNode; polygons: PolygonNode[]; srid?: number }

Type declaration

OperatorNode: { left?: FilterNode; nodeType: OperatorNode; op: OperatorNodeOperators; right: FilterNode }

Type declaration

OrderbyItemNode: { nodeType: OrderbyItemNode; type: OrderDirection; value: string }

Type declaration

OrderbyNode: { nodeType: OrderbyNode; value: OrderbyItemNode[] }

Type declaration

PointNode: { nodeType: PointNode; point: PositionLiteral; srid?: number }

Type declaration

PolygonNode: { nodeType: PolygonNode; rings: RingLiteral[]; srid?: number }

Type declaration

PositionLiteral: { alt: number; lat: number; lon: number; lrm: number }

Type declaration

  • alt: number
  • lat: number
  • lon: number
  • lrm: number
    description

    linear referencing measure

RingLiteral: { positions: PositionLiteral[] }

Type declaration

SearchItemNode: { nodeType: SearchItemNode; type: SearchItemTypes; value: string }

Type declaration

Search parser nodes

SearchOperatorNode: { left?: SearchNode; nodeType: SearchOperatorNode; op: SearchOperators; right: SearchNode }

Type declaration

SelectFunctionNode: { args: SelectIdentifierNode[]; func: string; nodeType: SelectFunctionNode }

SelectFunctionNodes are representing a function

$select=MostPopularName(Location,Kind)

=> Would create a SelectFunctionNode inside a SelectPathNode

Type declaration

SelectIdentifierNode: { flag?: SelectIdentifierFlags; nodeType: SelectIdentifierNode; value: string }

SelectIdentifierNodes are representing an Identifier each

$select=Name,namespace.name,@Measures.currency

=> Would create a SelectIdentifierNode inside a SelectPathNode for Name and namespace.name and a SelectIdentifierNode with the flag set for @Measures.currency

=> Flag will be set if the identifier is a annotation (@)

Type declaration

SelectNode: { nodeType: SelectNode; value: (SelectPathNode | SelectPathNodeWithOptions)[] }

SelectNodes are representing a $select

$select=...

=> Would create a SelectNode

Type declaration

SelectOptions: { aliasAndValue?: any; compute?: ComputeNode; count?: any; expand?: ExpandNode; filter?: FilterNode; orderby?: OrderbyNode; search?: SearchNode; select?: SelectNode; skip?: number; top?: number }

SelectOptionsNodes are representing SelectOptions

$select=Name($top=4)

=> Would create a SelectIdentifierNode inside a SelectPathNodeWithOptions for Name

Type declaration

SelectOptionsUnprocessedNode: { nodeType: SelectOptionsUnprocessedNode; value: string }

for internal processing

Type declaration

SelectPathNode: { nodeType: SelectPathNode; value: SelectItemNode[] }

SelectPathNodes are representing one selectItem (seperated by comma) each

$select=Name,Adress/Street

=> Would create two SelectPathNodes

Type declaration

SelectPathNodeWithOptions: { nodeType: SelectPathNodeWithOptions; options: SelectOptions | SelectOptionsUnprocessedNode; value: SelectItemNode[] }

SelectPathNodeWithOptions are representing one selectItem (seperated by comma) each, that have options

$select=Name,Adress/Street($top=5)

=> Would create a SelectPathNode for Name and a SelectPathNodeWithOptions for Adress/Street($top=5)

SymbolNode: { nodeType: SymbolNode; type: SymbolNodeTypes; value: string }

Type declaration

oDataParameters: { compute?: string; count?: string; expand?: string; filter?: string; orderby?: string; search?: string; select?: string; skip?: string; top?: string }

Type declaration

  • Optional compute?: string
  • Optional count?: string
  • Optional expand?: string
  • Optional filter?: string
  • Optional orderby?: string
  • Optional search?: string
  • Optional select?: string
  • Optional skip?: string
  • Optional top?: string
oDataParseResult: { compute?: ComputeNode; count?: boolean; expand?: ExpandNode; filter?: FilterNode; orderby?: OrderbyNode; search?: SearchNode; select?: SelectNode; skip?: number; top?: number }

Type declaration

Variables

computeParser: { parse: ((expr: string) => ComputeNode) }

Type declaration

  • parse: ((expr: string) => ComputeNode)
      • Parser for compute expressions

        example

        computeParser.parse("FirstName as Name")

        Parameters

        • expr: string

          compute expression as string

        Returns ComputeNode

        Abstract Syntax Tree (AST) of type ComputeNode

expandParser: { parse: ((expr: string) => ExpandNode) }

Type declaration

  • parse: ((expr: string) => ExpandNode)
      • Parser for expand expressions

        example

        expandParser.parse("Items/$ref")

        Parameters

        • expr: string

          expand expression as string

        Returns ExpandNode

        Abstract Syntax Tree (AST) of type ExpandNode

filterParser: { parse: ((expr: string, options?: ParserOptions) => FilterNode) }

Type declaration

  • parse: ((expr: string, options?: ParserOptions) => FilterNode)
      • (expr: string, options?: ParserOptions): FilterNode
      • Parser for filter expressions

        example

        filterParser.parse("Name eq 'Max'");

        Parameters

        • expr: string

          filter expression as string

        • Optional options: ParserOptions

          options for peggy.js parser

        Returns FilterNode

        Abstract Syntax Tree (AST) of type FilterNode

orderbyParser: { parse: ((expr: string) => OrderbyNode) }

Type declaration

  • parse: ((expr: string) => OrderbyNode)
      • Parser for orderby expression

        example

        orderbyParser.parse("Country/Name asc,Street desc")

        Parameters

        • expr: string

          orderby expression as string

        Returns OrderbyNode

        AbstractSyntaxTree (AST) of type OrderbyNode

searchParser: { parse: ((expr: string) => SearchNode) }

Type declaration

  • parse: ((expr: string) => SearchNode)
      • Parser for search expressions

        example

        searchParser.parse("blue OR green OR red")

        Parameters

        • expr: string

          search expression as string

        Returns SearchNode

        Abstract Syntax Tree (AST) of type SearchNode

selectParser: { parse: ((expr: string) => SelectNode) }

Type declaration

  • parse: ((expr: string) => SelectNode)
      • Parser for select expressions

        example

        selectParser.parse("Name,Age")

        Parameters

        • expr: string

          select expression as string

        Returns SelectNode

        Abstract Syntax Tree (AST) of type SelectNode

skipParser: { parse: ((expr: string) => number) }

Type declaration

  • parse: ((expr: string) => number)
      • (expr: string): number
      • Parser for skip expressions

        example

        skipParser.parse("5");

        Parameters

        • expr: string

          skip expression as string

        Returns number

        integer number for skip

topParser: { parse: ((expr: string) => number) }

Type declaration

  • parse: ((expr: string) => number)
      • (expr: string): number
      • Parser for top expression

        example

        topParser.parse("5");

        Parameters

        • expr: string

          top expression as string

        Returns number

        integer for top

Functions

Generated using TypeDoc