11.7 其他 EBNF 定义

SearchConditionStr

此函数的语法(以 EBNF 显示)为:

SearchConditionStr
  ::= '"' Expression '"'

图 11.24 SearchConditionStr

Image shows the syntax in EBNF form as described in the preceding text.

SearchExprStrList

此函数的语法(以 EBNF 显示)为:

SearchExprStrList
  ::= '[' '"' Expression '"' ( ',' '"' Expression '"' )* ']'

图 11.25 SearchExprStrList

Image shows the syntax in EBNF form as described in the preceding text.

ProjectedDocumentExprStr

此函数的语法(以 EBNF 显示)为:

ProjectedDocumentExprStr
  ::= ProjectedSearchExprStrList | 'expr("' JSONDocumentExpression '")'

图 11.26 ProjectedDocumentExprStr

Image shows the syntax in EBNF form as described in the preceding text.

ProjectedSearchExprStrList

此函数的语法(以 EBNF 显示)为:

ProjectedSearchExprStrList
  ::= '[' '"' Expression ( 'AS' Alias )? '"' ( ',' '"' Expression ( 'AS' Alias )? '"' )* ']'

图 11.27 ProjectedSearchExprStrList

Image shows the syntax in EBNF form as described in the preceding text.

SortExprStrList

此函数的语法(以 EBNF 显示)为:

SortExprStrList
  ::= '[' '"' Expression ( 'ASC' | 'DESC' )? '"' ( ',' '"' Expression ( 'ASC' | 'DESC' )? '"' )* ']'

图 11.28 SortExprStrList

Image shows the syntax in EBNF form as described in the preceding text.

ExprOrLiteral

此函数的语法(以 EBNF 显示)为:

ExprOrLiteral
  ::= 'expr("' Expression '")' | Literal

图 11.29 ExprOrLiteral

Image shows the syntax in EBNF form as described in the preceding text.

ExprOrLiterals

此函数的语法(以 EBNF 显示)为:

ExprOrLiterals
  ::= ExprOrLiteral ( ',' ExprOrLiteral )*

图 11.30 ExprOrLiterals

Image shows the syntax in EBNF form as described in the preceding text.

ExprOrLiteralOrOperand

此函数的语法(以 EBNF 显示)为:

ExprOrLiteralOrOperand
  ::= ExprOrLiteral

图 11.31 ExprOrLiteralOrOperand

Image shows the syntax in EBNF form as described in the preceding text.

PlaceholderValues

此函数的语法(以 EBNF 显示)为:

PlaceholderValues
  ::= '{' PlaceholderName ':' ( ExprOrLiteral ) '}'

图 11.32 PlaceholderValues

Image shows the syntax in EBNF form as described in the preceding text.

PlaceholderName

此函数的语法(以 EBNF 显示)为:

PlaceholderName
  ::= NamedPlaceholderNotQuestionmarkNotNumbered

图 11.33 PlaceholderName

Image shows the syntax in EBNF form as described in the preceding text.

DocPath

此函数的语法(以 EBNF 显示)为:

DocPath
  ::= ( '[*]' | ( '[' Index ']' ) | '.*' | ( '.' StringLiteral ) | '**' )+

图 11.34 DocPath

Image shows the syntax in EBNF form as described in the preceding text.

Literal

此函数的语法(以 EBNF 显示)为:

Literal
  ::= '"' StringLiteral '"' | Number | true | false | Document

图 11.35 Literal

Image shows the syntax in EBNF form as described in the preceding text.

Expression

Expression
  ::= Literal
   | DocPath
   | TableField
   | FunctionName '(' Expression ( ',' Expression )* ')'
   | ':' PlaceholderName
   | Expression Operator Expression
   | JSONExpression

图 11.36 Expression

Image shows the syntax in EBNF form as described in the preceding text.

Document

期望 JSON 文档的 API 调用允许使用多种数据类型来描述文档。根据 X DevAPI 实现和语言,可以使用以下任何数据类型

  • 字符串

  • 原生 JSON

  • 等效于 JSON 的语法

  • DbDoc

  • 生成的文档类

所有 X DevAPI 实现都允许使用特殊的 DbDoc 类型和字符串来表示文档。

此函数的语法(以 EBNF 显示)为:

Document
  ::= JSONDocument | JSONEquivalentDocument | DbDoc | GeneratedDocumentClasses

图 11.37 Document

Image shows the syntax in EBNF form as described in the preceding text.

JSONExpression

此函数的语法(以 EBNF 显示)为:

JSONExpression
  ::= JSONDocumentExpression | '[' Expression ( ',' Expression )* ']'

图 11.38 JSONExpression

Image shows the syntax in EBNF form as described in the preceding text.

JSONDocumentExpression

此函数的语法(以 EBNF 显示)为:

JSONDocumentExpression
  ::= '{' StringLiteral ':' JSONExpression (',' StringLiteral ':' JSONExpression)* '}'

图 11.39 JSONDocumentExpression

Image shows the syntax in EBNF form as described in the preceding text.

FunctionName

此函数的语法(以 EBNF 显示)为:

FunctionName
  ::= StringLiteral | StringLiteral '.' StringLiteral

图 11.40 FunctionName

Image shows the syntax in EBNF form as described in the preceding text.

DocumentOrJSON

此函数的语法(以 EBNF 显示)为:

DocumentOrJSON
  ::= Document | 'expr("' JSONDocumentExpression '")'

图 11.41 DocumentOrJSON

Image shows the syntax in EBNF form as described in the preceding text.

TableField

此函数的语法(以 EBNF 显示)为:

TableField
  ::= ( StringLiteral '.' )? ( StringLiteral '.' )? StringLiteral ( '@' DocPath )?

图 11.42 TableField

Image shows the syntax in EBNF form as described in the preceding text.

TableFields

此函数的语法(以 EBNF 显示)为:

TableFields
  ::= ( '[' TableField ( ',' TableField )* ']' )

图 11.43 TableFields

Image shows the syntax in EBNF form as described in the preceding text.