relax-orm
Version:
ORM for OracleDB
16 lines • 721 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var key_constant_1 = require("./key.constant");
function addAttribute(target, propertyKey, options) {
var attributes = getAttributes(target);
attributes.columsInfo[propertyKey] = options;
attributes.rowNameMap[options.column] = propertyKey;
Reflect.defineMetadata(key_constant_1.ATTRIBUTES_KEY, attributes, target);
}
exports.addAttribute = addAttribute;
function getAttributes(target) {
var attributes = Reflect.getMetadata(key_constant_1.ATTRIBUTES_KEY, target);
return attributes ? attributes : { rowNameMap: {}, columsInfo: {} };
}
exports.getAttributes = getAttributes;
//# sourceMappingURL=attribute.service.js.map