@crnk/angular-ngrx
Version:
Angular helper library for ngrx-json-api and crnk:
49 lines • 2.13 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import { BeanPath, BooleanPath, StringPath } from '../expression/';
import { MetaKey, QMetaKey } from './meta.key';
import { ManyQueryResult, OneQueryResult } from 'ngrx-json-api';
var QMetaPrimaryKey = /** @class */ (function (_super) {
__extends(QMetaPrimaryKey, _super);
function QMetaPrimaryKey() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.metaId = 'resources.meta.primaryKey';
_this.id = _this.createString('id');
_this.type = _this.createString('type');
_this.attributes = new QMetaPrimaryKey.QAttributes(_this, 'attributes');
_this.relationships = new QMetaKey.QRelationships(_this, 'relationships');
return _this;
}
return QMetaPrimaryKey;
}(BeanPath));
export { QMetaPrimaryKey };
(function (QMetaPrimaryKey) {
var QAttributes = /** @class */ (function (_super) {
__extends(QAttributes, _super);
function QAttributes() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.generated = _this.createBoolean('generated');
_this.unique = _this.createBoolean('unique');
_this.name = _this.createString('name');
return _this;
}
return QAttributes;
}(BeanPath));
QMetaPrimaryKey.QAttributes = QAttributes;
})(QMetaPrimaryKey || (QMetaPrimaryKey = {}));
export var createEmptyMetaPrimaryKey = function (id) {
return {
id: id,
type: 'meta/primaryKey',
attributes: {},
};
};
//# sourceMappingURL=meta.primary.key.js.map