protected override TokenResult ProcessToken(int position)
        {
            var token = Tokens[position].Text;

            switch (token.ToLower())
            {
            case "on":
                _insideOnClause = true;
                break;

            case "join":
                _insideOnClause = false;
                break;
            }

            if (!_insideOnClause)
            {
                token = token.Replace('.', '_');
            }

            token = token.Replace("[", string.Empty).Replace("]", string.Empty);

            var result = new TokenResult {
                Text = token, NewPosition = position
            };

            var handleNoLock = HandleNoLock(position);

            if (handleNoLock != null)
            {
                result = handleNoLock;
            }

            return(result);
        }
示例#2
0
        protected override TokenResult ProcessToken(int position)
        {
            var token = Tokens[position].Text;

            var result = new TokenResult {
                Text = token, NewPosition = position
            };

            if (token.ToLower() == "offset")
            {
                result = HandleOffset(position);
            }

            return(result);
        }
        protected override TokenResult ProcessToken(int position)
        {
            var token = Tokens[position].Text;

            token = token.Replace("+", "||");

            var result = new TokenResult {
                Text = token, NewPosition = position
            };

            if (token.ToLower() == "dateadd")
            {
                result = HandleDateAdd(position);
            }

            return(result);
        }
示例#4
0
        protected override TokenResult ProcessToken(int position)
        {
            var token = Tokens[position].Text;

            var result = new TokenResult {
                Text = token, NewPosition = position
            };

            if (token.ToLower() == "dateadd")
            {
                result = HandleDateAdd(position);
            }
            else if (token.ToLower() == "varchar")
            {
                result = new TokenResult {
                    Text = "text", NewPosition = position
                }
            }
            ;

            return(result);
        }