Set up connector/adapter when postInit is not called
This commit is contained in:
parent
6af4b1ba2f
commit
9b169efc8c
|
@ -61,7 +61,10 @@ function DataSource(name, settings) {
|
|||
this._operations = {};
|
||||
|
||||
this.setup(name, settings);
|
||||
|
||||
|
||||
this.connector = this.connector || this.adapter;
|
||||
this.adapter = this.connector; // Keep the adapter as an alias to connector
|
||||
|
||||
// connector
|
||||
var connector = this.connector;
|
||||
|
||||
|
@ -971,6 +974,9 @@ DataSource.prototype.log = function (sql, t) {
|
|||
* Freeze dataSource. Behavior depends on connector
|
||||
*/
|
||||
DataSource.prototype.freeze = function freeze() {
|
||||
if (this.connector.freezeDataSource) {
|
||||
this.connector.freezeDataSource();
|
||||
}
|
||||
if (this.connector.freezeSchema) {
|
||||
this.connector.freezeSchema();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue