Ejemplo n.º 1
0
        public void BasicTest()
        {
            var c1 = new ExprColumn(null, new ExprColumnName("C1"));
            var c2 = new ExprColumn(null, new ExprColumnName("C2"));

            Assert.AreEqual("[C1]", c1.ToSql());
            Assert.AreEqual("[C1]=5", (c1 == 5).ToSql());
            Assert.AreEqual("[C1]>=5 AND [C2]!='6' OR [C2]!='7''n''7'", (c1 >= 5 & c2 != "6" | c2 != "7'n'7").ToSql());
            Assert.AreEqual("[C1]<5 AND([C2]<=6 OR [C2]='7''n''7' AND [C2]>'2020-02-21')", (c1 < 5 & (c2 <= 6 | c2 == "7'n'7" & c2 > new DateTime(2020, 02, 21))).ToSql());
        }