From d442c40f25adc5e801ba7d27e95c40f767131435 Mon Sep 17 00:00:00 2001 From: Ritchie Date: Mon, 17 Jun 2013 11:43:20 -0700 Subject: [PATCH] Rename discoverModels to discoverModelDefinitions --- lib/datasource.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/datasource.js b/lib/datasource.js index 00c0148c..51799725 100644 --- a/lib/datasource.js +++ b/lib/datasource.js @@ -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; };