コード例 #1
0
        public void InSimple3()
        {
            WhereList w = new WhereList(global::SqlBuilder.Format.MsSQL);

            w.In("id_user", "SELECT id FROM tab_users");
            string result = w.GetSql();
            string sql    = "[id_user] IN (SELECT id FROM tab_users)";

            Assert.AreEqual(sql, result);
        }
コード例 #2
0
        public void InSimple2()
        {
            SqlBuilder.DefaultFormatter = FormatterLibrary.MsSql;

            WhereList w = new WhereList(SqlBuilder.DefaultFormatter);

            w.In("id_user", "SELECT id FROM tab_users");
            string result = w.GetSql();
            string sql    = "[id_user] IN (SELECT id FROM tab_users)";

            Assert.AreEqual(sql, result);
        }
コード例 #3
0
        public void InSimple1()
        {
            WhereList w = new WhereList(global::SqlBuilder.Format.MsSQL);

            w.Equal("a");
            w.In("b", "1", "2", "3");
            w.Equal("c");
            string result = w.GetSql();
            string sql    = "[a]=@a AND [b] IN (1, 2, 3) AND [c]=@c";

            Assert.AreEqual(sql, result);
        }
コード例 #4
0
        public void InSimple2()
        {
            SuperSql.DefaultFormatter = FormatterLibrary.MsSql;

            var w = new WhereList(SuperSql.DefaultFormatter);

            w.In("id_user", "SELECT id FROM tab_users");
            var result = w.GetSql();
            var sql    = "[id_user] IN (SELECT id FROM tab_users)";

            Assert.Equal(sql, result);
        }
コード例 #5
0
        public void InSimple1()
        {
            SqlBuilder.DefaultFormatter = FormatterLibrary.MsSql;

            WhereList w = new WhereList(SqlBuilder.DefaultFormatter);

            w.Equal("a");
            w.In("b", "1", "2", "3");
            w.Equal("c");
            string result = w.GetSql();
            string sql    = "[a]=@a AND [b] IN (1, 2, 3) AND [c]=@c";

            Assert.AreEqual(sql, result);
        }
コード例 #6
0
        public void InSimple1()
        {
            SuperSql.DefaultFormatter = FormatterLibrary.MsSql;

            var w = new WhereList(SuperSql.DefaultFormatter);

            w.Equal("a");
            w.In("b", "1", "2", "3");
            w.Equal("c");
            var result = w.GetSql();
            var sql    = "[a]=@a AND [b] IN (1, 2, 3) AND [c]=@c";

            Assert.Equal(sql, result);
        }