UNPKG

lincd

Version:

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

18 lines 618 B
import { MutationQueryFactory } from './MutationQuery.js'; export class UpdateQueryFactory extends 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, }; } } //# sourceMappingURL=UpdateQuery.js.map