11.2 Schema 物件與函式

Schema

此函式在 EBNF 中顯示的語法為

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

圖 11.6 Schema

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.