天天看點

SequoiaDB 巨杉資料庫】help()示例

  1. 顯示全局幫助資訊。
> help()
           
  1. 顯示類包含的的所有方法。
> Oma.help()
    --Constructor methods for class "Oma":
    var oma = new Oma([hostname],[svcname])
                          - Class for cluster management.
    --Static methods for class "Oma":
    Oma.addAOmaSvcName(<hostname>,<svcname>,[isReplace],[confFile])
                          - Specify the service name of sdbcm in target
                            host.
    Oma.delAOmaSvcName(hostname,[confFile])
                          - Delete the service name of sdbcm from its
                            configuration file in target host.
    Oma.getAOmaSvcName(hostname,[confFile])
                          - Get the service name of sdbcm in target host.
    ...
           
  1. 顯示對象包含的所有方法。
> var oma = new Oma()
> oma.help()
    --Instance methods for class "Oma":
    close()              - Close the Oma object.
    createCoord(<svcname>,<dbpath>,[config])
                         - Create a coord node in target host of sdbcm.
    createData(<svcname>,<dbpath>,[config])
                         - Create a standalone node in target host of
                           sdbcm.
    ...
           
  1. 檢視具體方法的詳細幫助文檔。
> help("createCS")

createCS(1)                       Version 2.8                      createCS(1)

NAME
    createCS - Create a collection space in current database.

SYNOPSIS
    db.createCS(<name>,[options])

CATEGORY
    Sequoiadb

DESCRIPTION
    Create a collection space in a database instance.

    name (string)
            Collection space name. Collection space name should be
            unique to each other in a database instance.
...
           
  1. 查詢具體類或者對象具體方法的詳細幫助文檔。
> var db = new Sdb()
> db.sample.help("createCL") // 或者 SdbCS.help("createCL")

createCL(1)                       Version 2.8                      createCL(1)

NAME
    createCL - create a new collection.

SYNOPSIS
    db.collectionspace.createCL(<name>,[option])

CATEGORY
    Collection Space

DESCRIPTION
    Create a collection in a specified collection space.  Collection is a
    logical object which stores records.  Each record should belong to one
    and only one collection.

PARAMETERS
    * name ( String , Required )

        The name of the collection, should be unique to each other in a
        collection space.

...
           

了解更多請點選巨杉資料庫官網