11.2 模式对象和函数

模式

此函数的 EBNF 语法如下所示:

Schema
    ::= '.getName()'         
        | '.existsInDatabase()'
        | '.getSession()'
        | '.getCollection(' StringLiteral ')'
        | '.getCollections()'
        | '.getCollectionAsTable(' StringLiteral ')'
        | '.dropCollection(' StringLiteral ')'
        | '.getTable(' StringLiteral ')'
        | '.getTables()'
        | '.createCollection(' StringLiteral ')'

图 11.6 模式

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

集合

此函数的 EBNF 语法如下所示:

Collection
    ::= '.getSchema()'
        | '.getName()'
        | '.getSession()'
        | '.existsInDatabase()'
        | '.replaceOne(' DocumentId ',' DocumentOrJSON  ')'
        | '.addOrReplaceOne(' DocumentId ',' DocumentOrJSON  ')'
        | '.getOne(' DocumentId ')'
        | '.removeOne(' DocumentId ')'
        | CollectionFindFunction
        | CollectionModifyFunction
        | CollectionAddFunction
        | CollectionRemoveFunction
        | CollectionCreateIndex
        | CollectionDropIndex

图 11.7 集合

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

此函数的 EBNF 语法如下所示:

Table
    ::= '.getSchema()'
        | '.getName()'
        | '.getSession()'
        | '.existsInDatabase()'
        | '.isView()'
        | TableSelectFunction
        | TableUpdateFunction
        | TableInsertFunction
        | TableDeleteFunction

图 11.8 表

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