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) {
|
||||
var args = slice.call(arguments);
|
||||
|
||||
|
@ -283,7 +284,6 @@ DataSource.prototype.define = function defineClass(className, properties, settin
|
|||
}
|
||||
|
||||
return NewClass;
|
||||
|
||||
};
|
||||
|
||||
// alias createModel
|
||||
|
@ -418,20 +418,20 @@ DataSource.prototype.autoupdate = function (cb) {
|
|||
* limit: The page size
|
||||
* offset: The starting index
|
||||
*/
|
||||
DataSource.prototype.discoverModels = function (options, cb) {
|
||||
DataSource.prototype.discoverModelDefinitions = function (options, cb) {
|
||||
this.freeze();
|
||||
if (this.adapter.discoverModels) {
|
||||
this.adapter.discoverModels(options, cb);
|
||||
if (this.adapter.discoverModelDefinitions) {
|
||||
this.adapter.discoverModelDefinitions(options, cb);
|
||||
} else if (cb) {
|
||||
cb();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
DataSource.prototype.discoverModelsSync = function (options) {
|
||||
DataSource.prototype.discoverModelDefinitionsSync = function (options) {
|
||||
this.freeze();
|
||||
if (this.adapter.discoverModelsSync) {
|
||||
return this.adapter.discoverModelsSync(options);
|
||||
if (this.adapter.discoverModelDefinitionsSync) {
|
||||
return this.adapter.discoverModelDefinitionsSync(options);
|
||||
}
|
||||
return null;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue