public override string PrettyPrint(TokenNameLookup tokenNameLookup)
        {
            string labelName  = EscapeLabelOrRelTyp(tokenNameLookup.LabelGetName(_schema.LabelId));
            string nodeName   = labelName.ToLower();
            string properties = SchemaUtil.niceProperties(tokenNameLookup, _schema.PropertyIds, nodeName + ".", false);

            return(string.Format("CONSTRAINT ON ( {0}:{1} ) ASSERT exists({2})", nodeName, labelName, properties));
        }
Пример #2
0
 protected internal virtual string FormatProperties(int[] propertyIds, TokenNameLookup tokenNameLookup, string nodeName)
 {
     return(SchemaUtil.niceProperties(tokenNameLookup, propertyIds, nodeName + ".", propertyIds.Length > 1));
 }
        public override string GetUserMessage(TokenNameLookup tokenNameLookup)
        {
            string propertyNoun = (_schema.PropertyIds.length > 1) ? "properties" : "property";

            return(format("Node(%d) with label `%s` must have the %s `%s`", _nodeId, tokenNameLookup.LabelGetName(_schema.LabelId), propertyNoun, SchemaUtil.niceProperties(tokenNameLookup, _schema.PropertyIds)));
        }