Documentation Home
X DevAPI User Guide
Download this Manual

X DevAPI User Guide  /  CRUD EBNF Definitions  /  Collection CRUD Functions

11.3 Collection CRUD Functions

CollectionFindFunction

The syntax for this function in EBNF is:

CollectionFindFunction
  ::= '.find(' SearchConditionStr? ')' ( '.fields(' ProjectedDocumentExprStr ')' )?
      ( '.groupBy(' SearchExprStrList ')' )? ( '.having(' SearchConditionStr ')' )?
      ( '.sort(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' ( '.offset(' NumberOfRows ')' )? )?
      ( '.lockExclusive(' LockContention ')' | '.lockShared(' LockContention ')' )? 
      ( '.bind(' PlaceholderValues ')' )*
      ( '.execute()' )?

Figure 11.9 CollectionFindFunction

Content is described in the surrounding text.

CollectionModifyFunction

The syntax for this function shown in EBNF is:

CollectionModifyFunction
  ::= '.modify(' SearchConditionStr ')'
      ( '.set(' CollectionField ',' ExprOrLiteral ')' |
        '.unset(' CollectionFields ')' |
        '.arrayInsert(' CollectionField ',' ExprOrLiteral ')' |
        '.arrayAppend(' CollectionField ',' ExprOrLiteral ')' |
        '.arrayDelete(' CollectionField ')' |
        '.patch(' DocumentOrJSON ')'
      )+
      ( '.sort(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' )?
      ( '.bind(' PlaceholderValues ')' )*
      ( '.execute()' )?

Figure 11.10 CollectionModifyFunction

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

CollectionAddFunction

The syntax for this function shown in EBNF is:

CollectionAddFunction
    ::= ( '.add(' ( DocumentOrJSON | '[' DocumentOrJSON ( ',' DocumentOrJSON )* ']' )? ')' )+
        ( '.execute()' )?

Figure 11.11 CollectionAddFunction

Content is described in the surrounding text.

CollectionRemoveFunction

The syntax for this function shown in EBNF is:

CollectionRemoveFunction
    ::= '.remove(' SearchConditionStr ')'
        ( '.sort(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' )?
        ( '.bind(' PlaceholderValues ')' )*
        ( '.execute()' )?

Figure 11.12 CollectionRemoveFunction

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


User Comments
User comments in this section are, as the name implies, provided by MySQL users. The MySQL documentation team is not responsible for, nor do they endorse, any of the information provided here.
Sign Up Login You must be logged in to post a comment.