JSDoc improvements
Improve createModel doc, Fix some other minor issues.
This commit is contained in:
parent
ca0c82ca4e
commit
653aab856c
|
@ -494,7 +494,11 @@ DataSource.prototype.setupDataAccess = function (modelClass, settings) {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define a model class.
|
* Define a model class. Returns newly created model object.
|
||||||
|
* The first (String) argument specifying the model name is required.
|
||||||
|
* You can provide one or two JSON object arguments, to provide configuration options.
|
||||||
|
* See [Model definition reference](http://docs.strongloop.com/display/DOC/Model+definition+reference) for details.
|
||||||
|
*
|
||||||
* Simple example:
|
* Simple example:
|
||||||
* ```
|
* ```
|
||||||
* var User = dataSource.createModel('User', {
|
* var User = dataSource.createModel('User', {
|
||||||
|
@ -533,9 +537,8 @@ DataSource.prototype.setupDataAccess = function (modelClass, settings) {
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* @param {String} className Name of the model to create.
|
* @param {String} className Name of the model to create.
|
||||||
* @param {Object} properties Hash of class properties in format `{property: Type, property2: Type2, ...}` or `{property: {type: Type}, property2: {type: Type2}, ...}`
|
* @param {Object} properties Hash of model properties in format `{property: Type, property2: Type2, ...}` or `{property: {type: Type}, property2: {type: Type2}, ...}`
|
||||||
* @param {Object} settings Other configuration settings.
|
* @options {Object} properties Other configuration options. This corresponds to the options key in the config object.
|
||||||
* @returns newly created class
|
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -766,10 +769,10 @@ DataSource.prototype.autoupdate = function (models, cb) {
|
||||||
*
|
*
|
||||||
* Keys in options object:
|
* Keys in options object:
|
||||||
*
|
*
|
||||||
* @property all {Boolean} If true, discover all models; if false, discover only models owned by the current user.
|
* @property {Boolean} all If true, discover all models; if false, discover only models owned by the current user.
|
||||||
* @property views {Boolean} If true, nclude views; if false, only tables.
|
* @property {Boolean} views If true, nclude views; if false, only tables.
|
||||||
* @property limit {Number} Page size
|
* @property {Number} limit Page size
|
||||||
* @property offset {Number} Starting index
|
* @property {Number} offset Starting index
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
DataSource.prototype.discoverModelDefinitions = function (options, cb) {
|
DataSource.prototype.discoverModelDefinitions = function (options, cb) {
|
||||||
|
|
Loading…
Reference in New Issue