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

  • 產生的 Doc 類別

所有 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.