Beispiel #1
0
        public ColumnIdentifier GetSource(bool isRelational)
        {
            var source = Path;

            // accomodate parser's documentField() handling by removing "@"
            if (source.Length > 0 && source[0] == '@')
            {
                source = source.Substring(1);
            }
            ExprParser       p = new ExprParser(Path, false);
            ColumnIdentifier identifier;

            if (isRelational)
            {
                identifier = p.ParseTableUpdateField();
            }
            else
            {
                identifier = p.DocumentField().Identifier;
            }

            if (p.tokenPos < p.tokens.Count)
            {
                throw new ArgumentException("Invalid document path.");
            }

            return(identifier);
        }
Beispiel #2
0
        public ColumnIdentifier GetSource(bool isRelational)
        {
            var source = Path;

            // accomodate parser's documentField() handling by removing "@"
            if (source.Length > 0 && source[0] == '@')
            {
                source = source.Substring(1);
            }
            ExprParser       p = new ExprParser(Path, false);
            ColumnIdentifier identifier;

            if (isRelational)
            {
                identifier = p.ParseTableUpdateField();
            }
            else
            {
                identifier = p.DocumentField().Identifier;
            }

            return(identifier);
        }