Spec-Zone.ru › MySQL Connectors 1.0
Глава 12 Выражения Определения EBNF

Глава 12 Определения EBNF выражений

В этом разделе представлено наглядное руководство по грамматике языка выражений, используемого в X DevAPI.

ident

ident
   ::= ID | QUOTED_ID

Рисунок 12.1 ident

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

schemaQualifiedIdent

schemaQualifiedIdent
                  ::= ( ident_schema '.' )? ident

Рисунок 12.2 schemaQualifiedIdent

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

columnIdent

Рисунок 12.3 columnIdent

columnIdent
         ::= ( ident '.' ( ident '.' )? )? ident ( ( '->' | '->>' ) "'" '$' documentPath "'" )?
Image shows the syntax in EBNF form as described in the preceding text.

documentPathLastItem

documentPathLastItem
         ::= '[*]'
           | '[' INT ']'
           | '.*'
           | '.' documentPathMember

Рисунок 12.4 documentPathLastItem

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

documentPathItem

documentPathItem
         ::= documentPathLastItem
           | '**'

Рисунок 12.5 documentPathItem

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

documentPath

documentPath
          ::= documentPathItem* documentPathLastItem

Рисунок 12.6 documentPath

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

documentField

Рисунок 12.7 documentField

documentField
         ::= fieldId documentPath*
           | '$' documentPath
Image shows the syntax in EBNF form as described in the preceding text.

argsList

argsList ::= expr ( ',' expr )*

Рисунок 12.8 argsList

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

lengthSpec

lengthSpec ::= '(' INT ')'

Рисунок 12.9 lengthSpec

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

castType

castType ::= 'SIGNED' 'INTEGER'*
           | 'UNSIGNED' 'INTEGER'*
           | 'CHAR' lengthSpec*
           | 'BINARY' lengthSpec*
           | 'DECIMAL' ( lengthSpec | '(' INT ',' INT ')' )?
           | 'TIME'
           | 'DATE'
           | 'DATETIME'
           | 'JSON'

Рисунок 12.10 castType

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

functionCall

functionCall
         ::= schemaQualifiedIdent '(' argsList? ')'

Рисунок 12.11 functionCall

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

placeholder

placeholder ::= ':' ID

Рисунок 12.12 placeholder

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

groupedExpr

groupedExpr ::= '(' expr ')'

Рисунок 12.13 groupedExpr

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

unaryOp

unaryOp  ::= ( '!' | '~' | '+' | '-' ) atomicExpr

Рисунок 12.14 unaryOp

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

literal

literal  ::= INT
           | FLOAT
           | STRING_SQ
           | STRING_DQ
           | 'NULL'
           | 'FALSE'
           | 'TRUE'

Рисунок 12.15 literal

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

jsonKeyValue

jsonKeyValue ::= STRING_DQ ':' expr

Рисунок 12.16 jsonKeyValue

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

jsonDoc

jsonDoc  ::= '{' ( jsonKeyValue ( ',' jsonKeyValue )* )* '}'

Рисунок 12.17 jsonDoc

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

jsonarray

jsonArray ::= '[' ( expr ( ',' expr )* )* ']'

Рисунок 12.18 jsonarray

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

atomicExpr

atomicExpr
         ::= placeholder
           | columnOrPath
           | functionCall
           | groupedExpr
           | unaryOp
           | castOp

Рисунок 12.19 atomicExpr

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

intervalUnit

INTERVAL_UNIT
         ::= 'MICROSECOND'
           | 'SECOND'
           | 'MINUTE'
           | 'HOUR'
           | 'DAY'
           | 'WEEK'
           | 'MONTH'
           | 'QUARTER'
           | 'YEAR'
           | 'SECOND_MICROSECOND'
           | 'MINUTE_MICROSECOND'
           | 'MINUTE_SECOND'
           | 'HOUR_MICROSECOND'
           | 'HOUR_SECOND'
           | 'HOUR_MINUTE'
           | 'DAY_MICROSECOND'
           | 'DAY_SECOND'
           | 'DAY_MINUTE'
           | 'DAY_HOUR'
           | 'YEAR_MONTH'

Рисунок 12.20 INTERVAL_UNIT

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

interval

interval ::= 'INTERVAL' expr INTERVAL_UNIT

Рисунок 12.21 interval

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

intervalExpr

intervalExpr
         ::= atomicExpr ( ( '+' | '-' ) interval )*

Рисунок 12.22 intervalExpr

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

mulDivExpr

mulDivExpr
         ::= intervalExpr ( ( '*' | '/' | '%' ) intervalExpr )*

Рисунок 12.23 mulDivExpr

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

addSubExpr

addSubExpr
         ::= mulDivExpr ( ( '+' | '-' ) mulDivExpr )*

Рисунок 12.24 addSubExpr

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

shiftExpr

shiftExpr
         ::= addSubExpr ( ( '<<' | '>>' ) addSubExpr )*

Рисунок 12.25 shiftExpr

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

bitExpr

bitExpr  ::= shiftExpr ( ( '&' | '|' | '^' ) shiftExpr )*

Рисунок 12.26 bitExpr

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

compExpr

compExpr ::= bitExpr ( ( '>=' | '>' | '<=' | '<' | '=' | '<>' | '!=' ) bitExpr )*

Рисунок 12.27 compExpr

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

ilriExpr

ilriExpr ::= compExpr 'IS' 'NOT'* ( 'NULL' | 'TRUE' | 'FALSE' )
           | compExpr 'NOT'* 'IN' '(' argsList* ')'
           | compExpr 'NOT'* 'IN' compExpr
           | compExpr 'NOT'* 'LIKE' compExpr ( 'ESCAPE' compExpr )*
           | compExpr 'NOT'* 'BETWEEN' compExpr 'AND' compExpr
           | compExpr 'NOT'* 'REGEXP' compExpr
           | compExpr

Рисунок 12.28 ilriExpr

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

andExpr

andExpr  ::= ilriExpr ( ( '&&' | 'AND' ) ilriExpr )*

Рисунок 12.29 andExpr

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

orExpr

orExpr   ::= andExpr ( ( '||' | 'OR' ) andExpr )*

Рисунок 12.30 orExpr

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

expr

expr     ::= orExpr

Рисунок 12.31 expr

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

DIGIT

DIGIT    ::= '0' - '9'

Рисунок 12.32 DIGIT

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

FLOAT

FLOAT    ::= DIGIT* '.' DIGIT+ ( 'E' ( '+' | '-' )* DIGIT+ )*
           | DIGIT+ 'E' ( '+' | '-' )* DIGIT+

Рисунок 12.33 FLOAT

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

INT

INT      ::= DIGIT+

Рисунок 12.34 INT

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

QUOTED_ID

QUOTED_ID
         ::= '`' ID '`'
           | '`' ( '~' '`'* | '``' )* '`'

Рисунок 12.35 QUOTED_ID

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

ID

ID       ::= ( 'a' - 'z' | 'A' - 'Z' | '_' ) ( 'a' - 'z' | 'A' - 'Z' | '0' - '9' | '_' )*

Рисунок 12.36 ID

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

WS

WS       ::= [ \t\r\n]+

Рисунок 12.37 WS

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

SCHAR

SCHAR    ::= [\u0020\u0021\u0023\u0024\u0025\u0026\u0028-\u005B\u005D-\u007E]

Рисунок 12.38 SCHAR

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

STRING_DQ

STRING_DQ
         ::= '"' ( SCHAR | "'" | ESCAPED_DQ )* '"'

Рисунок 12.39 STRING_DQ

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

STRING_SQ

STRING_SQ
         ::= "'" ( SCHAR | '"' | ESCAPED_SQ )* "'"

Рисунок 12.40 STRING_SQ

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

© 2025 Oracle
Licensed under the GPLv2 License.
https://docs.oracle.com/cd/E17952_01/x-devapi-userguide-shell-js-en/mysql-x-expressions-ebnf-definitions.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API