Rename discoverModels to discoverModelDefinitions
This commit is contained in:
parent
25f2920e95
commit
d442c40f25
|
@ -258,6 +258,7 @@ DataSource.prototype.connector = function () {
|
||||||
* });
|
* });
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DataSource.prototype.define = function defineClass(className, properties, settings) {
|
DataSource.prototype.define = function defineClass(className, properties, settings) {
|
||||||
var args = slice.call(arguments);
|
var args = slice.call(arguments);
|
||||||
|
|
||||||
|
@ -283,7 +284,6 @@ DataSource.prototype.define = function defineClass(className, properties, settin
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewClass;
|
return NewClass;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// alias createModel
|
// alias createModel
|
||||||
|
@ -418,20 +418,20 @@ DataSource.prototype.autoupdate = function (cb) {
|
||||||
* limit: The page size
|
* limit: The page size
|
||||||
* offset: The starting index
|
* offset: The starting index
|
||||||
*/
|
*/
|
||||||
DataSource.prototype.discoverModels = function (options, cb) {
|
DataSource.prototype.discoverModelDefinitions = function (options, cb) {
|
||||||
this.freeze();
|
this.freeze();
|
||||||
if (this.adapter.discoverModels) {
|
if (this.adapter.discoverModelDefinitions) {
|
||||||
this.adapter.discoverModels(options, cb);
|
this.adapter.discoverModelDefinitions(options, cb);
|
||||||
} else if (cb) {
|
} else if (cb) {
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
DataSource.prototype.discoverModelsSync = function (options) {
|
DataSource.prototype.discoverModelDefinitionsSync = function (options) {
|
||||||
this.freeze();
|
this.freeze();
|
||||||
if (this.adapter.discoverModelsSync) {
|
if (this.adapter.discoverModelDefinitionsSync) {
|
||||||
return this.adapter.discoverModelsSync(options);
|
return this.adapter.discoverModelDefinitionsSync(options);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue