typeorm
Version:
Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB databases.
40 lines (38 loc) • 1.09 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
*/
var Alias = /** @class */ (function () {
function Alias(alias) {
Object.assign(this, alias || {});
}
Object.defineProperty(Alias.prototype, "target", {
get: function () {
return this.metadata.target;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Alias.prototype, "hasMetadata", {
get: function () {
return !!this._metadata;
},
enumerable: true,
configurable: true
});
Object.defineProperty(Alias.prototype, "metadata", {
get: function () {
if (!this._metadata)
throw new Error("Cannot get entity metadata for the given alias \"" + this.name + "\"");
return this._metadata;
},
set: function (metadata) {
this._metadata = metadata;
},
enumerable: true,
configurable: true
});
return Alias;
}());
exports.Alias = Alias;
//# sourceMappingURL=Alias.js.map