UNPKG

@clickup/ent-framework

Version:

A PostgreSQL graph-database-alike library with microsharding and row-level security

23 lines 663 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OutgoingEdgePointsToVC = void 0; /** * Checks that the field's value is the same as VC's principal: * * EntOur[user_id] ---> vc.principal */ class OutgoingEdgePointsToVC { constructor(field) { this.field = field; this.name = this.constructor.name + "(" + this.field + ")"; } async check(vc, row) { const toID = row[this.field]; if (!toID) { return false; } return toID === vc.principal; } } exports.OutgoingEdgePointsToVC = OutgoingEdgePointsToVC; //# sourceMappingURL=OutgoingEdgePointsToVC.js.map