示例#1
0
 public void SelectStar()
 {
     ParserTests.Validate("SELECT *");
     ParserTests.Invalidate("SELECT");
 }
示例#2
0
        private static void ValidateFromClause(string fromClause)
        {
            string query = $"SELECT * {fromClause}";

            ParserTests.Validate(query);
        }
示例#3
0
 public void Distinct()
 {
     ParserTests.Validate("SELECT DISTINCT *");
 }
示例#4
0
 public void Top()
 {
     ParserTests.Validate("SELECT TOP 5 *");
     ParserTests.Invalidate("SELECT TOP 'asdf' *");
 }
示例#5
0
 public void SelectValue()
 {
     ParserTests.Validate("SELECT VALUE 1");
     ParserTests.Invalidate("SELECT VALUE 1, 2");
     ParserTests.Invalidate("SELECTVALUE 1");
 }
示例#6
0
 public void SelectList()
 {
     ParserTests.Validate("SELECT 1, 2, 3");
     ParserTests.Validate("SELECT 1 AS asdf, 2, 3 AS asdf2");
     ParserTests.Invalidate("SELECT 1,");
 }
示例#7
0
        private static void InvalidateOrderBy(string orderByClause)
        {
            string query = $"SELECT * {orderByClause}";

            ParserTests.Invalidate(query);
        }
示例#8
0
        private static void InvalidateGroupBy(string groupByClause)
        {
            string query = $"SELECT * {groupByClause}";

            ParserTests.Invalidate(query);
        }
示例#9
0
        private static void InvalidateOffsetLimit(string offsetLimitClause)
        {
            string query = $"SELECT * {offsetLimitClause}";

            ParserTests.Invalidate(query);
        }