X DevAPI 用户指南  / 第 11 章 CRUD EBNF 定义  /  11.3 集合增删改查功能

11.3 集合增删改查功能

集合查找函数

EBNF 中此函数的语法为:

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

图 11.9 CollectionFindFunction

图像显示了 EBNF 形式的语法,如前文所述。

集合修改函数

EBNF 中显示的此函数的语法是:

Press CTRL+C to copy
CollectionModifyFunction ::= '.modify(' SearchConditionStr ')' ( '.set(' DocPath ',' ExprOrLiteral ')' | '.unset(' DocPath ( ',' DocPath )* ')' | '.arrayInsert(' DocPath ',' ExprOrLiteral ')' | '.arrayAppend(' DocPath ',' ExprOrLiteral ')' | '.patch(' DocumentOrJSON ')' )+ ( '.sort(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' )? ( '.bind(' PlaceholderValues ')' )* ( '.execute()' )?

图 11.10 CollectionModifyFunction

图像显示了 EBNF 形式的语法,如前文所述。

集合添加函数

EBNF 中显示的此函数的语法是:

Press CTRL+C to copy
CollectionAddFunction ::= ( '.add(' ( DocumentOrJSON | '[' DocumentOrJSON ( ',' DocumentOrJSON )* ']' )? ')' )+ ( '.execute()' )?

图 11.11 CollectionAddFunction

图像显示了 EBNF 形式的语法,如前文所述。

集合移除函数

EBNF 中显示的此函数的语法是:

Press CTRL+C to copy
CollectionRemoveFunction ::= '.remove(' SearchConditionStr ')' ( '.sort(' SortExprStrList ')' )? ( '.limit(' NumberOfRows ')' )? ( '.bind(' PlaceholderValues ')' )* ( '.execute()' )?

图 11.12 CollectionRemoveFunction

图像显示了 EBNF 形式的语法,如前文所述。