2020-09-11 14:44:34 +00:00
|
|
|
Policy ::=
|
|
|
|
RepStmt, [RepStmt],
|
|
|
|
CbtStmt?,
|
|
|
|
[SelectStmt],
|
|
|
|
[FilterStmt],
|
|
|
|
;
|
|
|
|
|
|
|
|
RepStmt ::=
|
|
|
|
'REP', Number1, (* number of object replicas *)
|
|
|
|
('AS', Ident)? (* optional selector name *)
|
|
|
|
;
|
|
|
|
|
|
|
|
CbtStmt ::= 'CBF', Number1 (* container backup factor *)
|
|
|
|
;
|
|
|
|
|
|
|
|
SelectStmt ::=
|
|
|
|
'SELECT', Number1, (* number of nodes to select without container backup factor *)
|
2020-10-14 15:25:21 +00:00
|
|
|
('IN', Clause?, Ident)?, (* bucket name *)
|
2020-09-11 14:44:34 +00:00
|
|
|
FROM, (Ident | '*'), (* filter reference or whole netmap *)
|
|
|
|
('AS', Ident)? (* optional selector name *)
|
|
|
|
;
|
|
|
|
|
|
|
|
Clause ::=
|
|
|
|
'SAME' (* nodes from the same bucket *)
|
|
|
|
| 'DISTINCT' (* nodes from distinct buckets *)
|
|
|
|
;
|
|
|
|
|
|
|
|
FilterStmt ::=
|
|
|
|
'FILTER', AndChain, ['OR', AndChain],
|
|
|
|
'AS', Ident (* obligatory filter name *)
|
|
|
|
;
|
|
|
|
|
|
|
|
AndChain ::=
|
|
|
|
Expr, ['AND', Expr]
|
|
|
|
;
|
|
|
|
|
|
|
|
Expr ::=
|
|
|
|
'@' Ident (* filter reference *)
|
2021-02-24 14:02:50 +00:00
|
|
|
| Key, Op, Value (* attribute filter *)
|
2020-09-11 14:44:34 +00:00
|
|
|
;
|
|
|
|
|
|
|
|
Op ::= 'EQ' | 'NE' | 'GE' | 'GT' | 'LT' | 'LE'
|
|
|
|
;
|
|
|
|
|
2021-02-24 14:02:50 +00:00
|
|
|
Key ::= Ident | String
|
|
|
|
;
|
|
|
|
|
2020-09-11 14:44:34 +00:00
|
|
|
Value ::= Ident | Number | String
|
|
|
|
;
|
|
|
|
|
|
|
|
Number1 ::= Digit1 [Digit];
|
|
|
|
Number ::= Digit [Digit];
|
|
|
|
|
|
|
|
Digit1 ::= '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' ;
|
|
|
|
Digit ::= '0' | Digit1;
|