cormo
Advanced tools
Comparing version 0.12.9 to 0.12.10
/// <reference types="node" /> | ||
import { EventEmitter } from 'events'; | ||
import { inspect } from 'util'; | ||
import { AdapterBase } from '../adapters/base'; | ||
@@ -145,3 +146,3 @@ import { createAdapter as createMongoDBAdapter, IAdapterSettingsMongoDB, MongoDBAdapter } from '../adapters/mongodb'; | ||
log(model: string, type: string, data: object): void; | ||
inspect(): string; | ||
[inspect.custom](): string; | ||
/** | ||
@@ -148,0 +149,0 @@ * Manipulate data |
@@ -285,3 +285,3 @@ "use strict"; | ||
log(model, type, data) { } | ||
inspect() { | ||
[util_1.inspect.custom]() { | ||
return util_1.inspect(this.models); | ||
@@ -288,0 +288,0 @@ } |
@@ -0,1 +1,3 @@ | ||
/// <reference types="node" /> | ||
import { inspect } from 'util'; | ||
import { AdapterBase } from '../adapters/base'; | ||
@@ -129,3 +131,3 @@ import { Connection, IAssociationBelongsToOptions, IAssociationHasManyOptions, IAssociationHasOneOptions } from '../connection'; | ||
static belongsTo(target_model_or_column: string | typeof BaseModel, options?: IAssociationBelongsToOptions): void; | ||
static inspect(depth: number): string; | ||
static [inspect.custom](depth: number): string; | ||
static _getKeyType(target_connection?: Connection<AdapterBase>): any; | ||
@@ -132,0 +134,0 @@ /** |
@@ -14,2 +14,3 @@ "use strict"; | ||
const lodash_1 = __importDefault(require("lodash")); | ||
const util_1 = require("util"); | ||
const connection_1 = require("../connection"); | ||
@@ -302,3 +303,3 @@ const query_1 = require("../query"); | ||
} | ||
static inspect(depth) { | ||
static [util_1.inspect.custom](depth) { | ||
const schema = Object.keys(this._schema || {}).sort() | ||
@@ -305,0 +306,0 @@ .map((column) => `${column}: ${this._schema[column].type}`) |
@@ -10,2 +10,3 @@ "use strict"; | ||
this.length = length; | ||
this.toString = () => this.length ? `string(${this.length})` : 'string'; | ||
}; | ||
@@ -17,2 +18,3 @@ exports.String = CormoTypesString; | ||
} | ||
this.toString = () => 'number'; | ||
}; | ||
@@ -25,2 +27,3 @@ exports.Number = CormoTypesNumber; | ||
} | ||
this.toString = () => 'boolean'; | ||
}; | ||
@@ -33,2 +36,3 @@ exports.Boolean = CormoTypesBoolean; | ||
} | ||
this.toString = () => 'integer'; | ||
}; | ||
@@ -41,2 +45,3 @@ exports.Integer = CormoTypesInteger; | ||
} | ||
this.toString = () => 'geopoint'; | ||
}; | ||
@@ -49,2 +54,3 @@ exports.GeoPoint = CormoTypesGeoPoint; | ||
} | ||
this.toString = () => 'date'; | ||
}; | ||
@@ -57,2 +63,3 @@ exports.Date = CormoTypesDate; | ||
} | ||
this.toString = () => 'object'; | ||
}; | ||
@@ -65,2 +72,3 @@ exports.Object = CormoTypesObject; | ||
} | ||
this.toString = () => 'recordid'; | ||
}; | ||
@@ -73,2 +81,3 @@ exports.RecordID = CormoTypesRecordID; | ||
} | ||
this.toString = () => 'text'; | ||
}; | ||
@@ -75,0 +84,0 @@ exports.Text = CormoTypesText; |
{ | ||
"name": "cormo", | ||
"description": "ORM framework for Node.js", | ||
"version": "0.12.9", | ||
"version": "0.12.10", | ||
"keywords": [ | ||
@@ -69,3 +69,3 @@ "orm", | ||
}, | ||
"gitHead": "07126f04f806483aee9e9639a191efcbaa6d4fe6" | ||
"gitHead": "0f5911f4b08bf677399c5c9dd1d09c93f6e787f9" | ||
} |
315901
8620