help()

名称

help - 显示帮助信息。

语法

help()

help()

类别

Global

描述

在全局范围内显示帮助信息:

  • help() - 显示全局的帮助信息。

  • help() - 显示具体方法的详细文档信息。

另外,也可以在类和对象范围查看帮助信息:

  • .help() - 显示该类或对象包含的所有方法。

  • .help() - 显示类或对象具体方法的详细文档信息。

参数

  • class ( Object必填 )

    javascript 类或者对象。

  • method ( String必填 )

    类或者对象的方法名。

返回值

帮助信息。

错误

无。

版本

v1.0及以上版本。

示例

  1. 显示全局帮助信息。

    1. > help()
  2. 显示类包含的的所有方法。

    1. > Oma.help()
    2. --Constructor methods for class "Oma":
    3. var oma = new Oma([hostname],[svcname])
    4. - Class for cluster management.
    5. --Static methods for class "Oma":
    6. Oma.addAOmaSvcName(<hostname>,<svcname>,[isReplace],[confFile])
    7. - Specify the service name of sdbcm in target
    8. host.
    9. Oma.delAOmaSvcName(hostname,[confFile])
    10. - Delete the service name of sdbcm from its
    11. configuration file in target host.
    12. Oma.getAOmaSvcName(hostname,[confFile])
    13. - Get the service name of sdbcm in target host.
    14. ...
  3. 显示对象包含的所有方法。

    1. > var oma = new Oma()
    2. > oma.help()
    3. --Instance methods for class "Oma":
    4. close() - Close the Oma object.
    5. createCoord(<svcname>,<dbpath>,[config])
    6. - Create a coord node in target host of sdbcm.
    7. createData(<svcname>,<dbpath>,[config])
    8. - Create a standalone node in target host of
    9. sdbcm.
    10. ...
  4. 查看具体方法的详细帮助文档。

    1. > help("createCS")
    2. createCS(1) Version 2.8 createCS(1)
    3. NAME
    4. createCS - Create a collection space in current database.
    5. SYNOPSIS
    6. db.createCS(<name>,[options])
    7. CATEGORY
    8. Sequoiadb
    9. DESCRIPTION
    10. Create a collection space in a database instance.
    11. name (string)
    12. Collection space name. Collection space name should be
    13. unique to each other in a database instance.
    14. ...
  5. 查询具体类或者对象具体方法的详细帮助文档。

    1. > var db = new Sdb()
    2. > db.foo.help("createCL") // 或者 SdbCS.help("createCL")
    3. createCL(1) Version 2.8 createCL(1)
    4. NAME
    5. createCL - create a new collection.
    6. SYNOPSIS
    7. db.collectionspace.createCL(<name>,[option])
    8. CATEGORY
    9. Collection Space
    10. DESCRIPTION
    11. Create a collection in a specified collection space. Collection is a
    12. logical object which stores records. Each record should belong to one
    13. and only one collection.
    14. PARAMETERS
    15. * name ( String , Required )
    16. The name of the collection, should be unique to each other in a
    17. collection space.
    18. ...