Documentation Home
X DevAPI User Guide for MySQL Shell in Python Mode
Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb


11.7 Other EBNF Definitions

SearchConditionStr

The syntax for this function shown in EBNF is:

SearchConditionStr
  ::= '"' Expression '"'

Figure 11.24 SearchConditionStr

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

SearchExprStrList

The syntax for this function shown in EBNF is:

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

Figure 11.25 SearchExprStrList

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

ProjectedDocumentExprStr

The syntax for this function shown in EBNF is:

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

Figure 11.26 ProjectedDocumentExprStr

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

ProjectedSearchExprStrList

The syntax for this function shown in EBNF is:

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

Figure 11.27 ProjectedSearchExprStrList

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

SortExprStrList

The syntax for this function shown in EBNF is:

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

Figure 11.28 SortExprStrList

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

ExprOrLiteral

The syntax for this function shown in EBNF is:

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

Figure 11.29 ExprOrLiteral

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

ExprOrLiterals

The syntax for this function shown in EBNF is:

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

Figure 11.30 ExprOrLiterals

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

ExprOrLiteralOrOperand

The syntax for this function shown in EBNF is:

ExprOrLiteralOrOperand
  ::= ExprOrLiteral

Figure 11.31 ExprOrLiteralOrOperand

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

PlaceholderValues

The syntax for this function shown in EBNF is:

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

Figure 11.32 PlaceholderValues

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

PlaceholderName

The syntax for this function shown in EBNF is:

PlaceholderName
  ::= NamedPlaceholderNotQuestionmarkNotNumbered

Figure 11.33 PlaceholderName

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

DocPath

The syntax for this function shown in EBNF is:

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

Figure 11.34 DocPath

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

Literal

The syntax for this function shown in EBNF is:

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

Figure 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

Figure 11.36 Expression

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

Document

An API call expecting a JSON document allows the use of many data types to describe the document. Depending on the X DevAPI implementation and language any of the following data types can be used:

  • String

  • Native JSON

  • JSON equivalent syntax

  • DbDoc

  • Generated Doc Classes

All implementations of X DevAPI allow expressing a document by the special DbDoc type and as a string.

The syntax for this function shown in EBNF is:

Document
  ::= JSONDocument | JSONEquivalentDocument | DbDoc | GeneratedDocumentClasses

Figure 11.37 Document

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

JSONExpression

The syntax for this function shown in EBNF is:

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

Figure 11.38 JSONExpression

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

JSONDocumentExpression

The syntax for this function shown in EBNF is:

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

Figure 11.39 JSONDocumentExpression

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

FunctionName

The syntax for this function shown in EBNF is:

FunctionName
  ::= StringLiteral | StringLiteral '.' StringLiteral

Figure 11.40 FunctionName

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

DocumentOrJSON

The syntax for this function shown in EBNF is:

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

Figure 11.41 DocumentOrJSON

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

TableField

The syntax for this function shown in EBNF is:

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

Figure 11.42 TableField

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

TableFields

The syntax for this function shown in EBNF is:

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

Figure 11.43 TableFields

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