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 ValidateOrderBy(string orderByClause) { string query = $"SELECT * {orderByClause}"; ParserTests.Validate(query); }
private static void ValidateGroupBy(string groupByClause) { string query = $"SELECT * {groupByClause}"; ParserTests.Validate(query); }
private static void ValidateOffsetLimit(string offsetLimitClause) { string query = $"SELECT * {offsetLimitClause}"; ParserTests.Validate(query); }