UNPKG

falkordb

Version:
23 lines (22 loc) 945 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.EntityType = exports.ConstraintType = void 0; exports.transformArguments = transformArguments; var ConstraintType; (function (ConstraintType) { ConstraintType["MANDATORY"] = "MANDATORY"; ConstraintType["UNIQUE"] = "UNIQUE"; })(ConstraintType || (exports.ConstraintType = ConstraintType = {})); var EntityType; (function (EntityType) { EntityType["NODE"] = "NODE"; EntityType["RELATIONSHIP"] = "RELATIONSHIP"; })(EntityType || (exports.EntityType = EntityType = {})); // GRAPH.CONSTRAINT CREATE key constraintType {NODE label | RELATIONSHIP reltype} PROPERTIES propCount prop [prop...] function transformArguments(key, constraintType, entityType, label, ...properties) { return [ 'GRAPH.CONSTRAINT', 'CREATE', key, constraintType, entityType, label, 'PROPERTIES', properties.length.toString(), ...properties ]; }