예제 #1
0
파일: Vdbe+Trace.cs 프로젝트: BclEx/GpuEx
        static int FindNextHostParameter(string sql, int sqlIdx, ref int tokens)
        {
            int total = 0;

            tokens = 0;
            while (sqlIdx < sql.Length)
            {
                TK  tokenType = 0;
                int n         = Parse.GetToken(sql, sqlIdx, ref tokenType);
                Debug.Assert(n > 0 && tokenType != TK.ILLEGAL);
                if (tokenType == TK.VARIABLE)
                {
                    tokens = n;
                    break;
                }
                total  += n;
                sqlIdx += n;
            }
            return(total);
        }