UNPKG

lincd

Version:

LINCD is a JavaScript library for building user interfaces with linked data (also known as 'structured data', or RDF)

22 lines 792 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UpdateQueryFactory = void 0; const MutationQuery_js_1 = require("./MutationQuery.js"); class UpdateQueryFactory extends MutationQuery_js_1.MutationQueryFactory { constructor(shapeClass, id, updateObjectOrFn) { super(); this.shapeClass = shapeClass; this.id = (typeof id === 'string' ? id : id.id || id.uri); this.fields = this.convertUpdateObject(updateObjectOrFn, this.shapeClass.shape); } getQueryObject() { return { type: 'update', id: this.id, shape: this.shapeClass.shape, updates: this.fields, }; } } exports.UpdateQueryFactory = UpdateQueryFactory; //# sourceMappingURL=UpdateQuery.js.map