"SequoiaDB Giant Sequoia Database" setDomain()

name

setDomain-Modify the domain of the collection space.

grammar

db.collectionspace.setDomain(<options>)

category

Collection Space

description

Modify the domain of the collection space.

parameter

  • options (  Objectrequired  )

    The optionsproperties of the collection space can be modified through parameters:

    1. Domain (  String  ): The domain to which it belongs.

      • The data in the collection space must be distributed on the group of the newly designated domain

      format:Domain : <domain>

return value

Success: None.

Failure: Throw an exception.

error

When an exception is thrown, you can () getLastError get an error code , or through ) getLastErrMsg ( get an error message. You can refer to the common error handling guide to learn more.

version

v2.10 and above.

Example

  1. Create a collection space, and then specify a domain for the collection space

    db.createCS( 'sample' )
    db.sample.setDomain( { Domain : 'domain' } )

    Click on Jushan Database Documentation Center for more information

Guess you like

Origin blog.csdn.net/weixin_45890253/article/details/112848118