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

            sqlBuilder.AddSelectClause("id");
            sqlBuilder.AddFromClause("foo");
            sqlBuilder.AddJoinClause("LEFT JOIN", "bar", "bar.id = foo.id");

            StringBuilder stringBuilder = new StringBuilder();

            sqlBuilder.BuildExpression(stringBuilder);

            Assert.AreEqual("SELECT DISTINCT id FROM foo LEFT JOIN bar ON bar.id = foo.id;", stringBuilder.ToString());
        }