public void SelectStar() { ParserTests.Validate("SELECT *"); ParserTests.Invalidate("SELECT"); }
private static void ValidateFromClause(string fromClause) { string query = $"SELECT * {fromClause}"; ParserTests.Validate(query); }
public void Distinct() { ParserTests.Validate("SELECT DISTINCT *"); }
public void Top() { ParserTests.Validate("SELECT TOP 5 *"); ParserTests.Invalidate("SELECT TOP 'asdf' *"); }
public void SelectValue() { ParserTests.Validate("SELECT VALUE 1"); ParserTests.Invalidate("SELECT VALUE 1, 2"); ParserTests.Invalidate("SELECTVALUE 1"); }
public void SelectList() { ParserTests.Validate("SELECT 1, 2, 3"); ParserTests.Validate("SELECT 1 AS asdf, 2, 3 AS asdf2"); ParserTests.Invalidate("SELECT 1,"); }
private static void InvalidateOrderBy(string orderByClause) { string query = $"SELECT * {orderByClause}"; ParserTests.Invalidate(query); }
private static void InvalidateGroupBy(string groupByClause) { string query = $"SELECT * {groupByClause}"; ParserTests.Invalidate(query); }
private static void InvalidateOffsetLimit(string offsetLimitClause) { string query = $"SELECT * {offsetLimitClause}"; ParserTests.Invalidate(query); }