예제 #1
0
        public void TestNotInExpressionTwoValues()
        {
            var actual = new InExpression()
            {
                Expression = new ColumnReference()
                {
                    Identifiers = new List <string>()
                    {
                        "c1"
                    }
                },
                Values = new List <ScalarExpression>()
                {
                    new StringLiteral()
                    {
                        Value = "a"
                    },
                    new IntegerLiteral()
                    {
                        Value = 1
                    }
                },
                Not = true
            }.Print();
            var expected = "c1 NOT IN ('a', 1)";

            actual.Should().Be(expected);
        }
예제 #2
0
        public void TestInExpressionSingleValue()
        {
            var actual = new InExpression()
            {
                Expression = new ColumnReference()
                {
                    Identifiers = new List <string>()
                    {
                        "c1"
                    }
                },
                Values = new List <ScalarExpression>()
                {
                    new StringLiteral()
                    {
                        Value = "a"
                    }
                }
            }.Print();
            var expected = "c1 IN ('a')";

            actual.Should().Be(expected);
        }