Exemplo n.º 1
0
        public void BuildExpression_Limit()
        {
            MySQLBuilder sqlBuilder = new MySQLBuilder();

            sqlBuilder.AddSelectClause("id");
            sqlBuilder.AddFromClause("employees");
            sqlBuilder.SkipResults(100);
            sqlBuilder.TakeResults(10);

            StringBuilder stringBuilder = new StringBuilder();

            sqlBuilder.BuildExpression(stringBuilder);

            Assert.AreEqual("SELECT DISTINCT id FROM employees LIMIT 100, 10;", stringBuilder.ToString());
        }