Example #1
0
        public void when_simple_query_get_when_clause()
        {
            var client = Substitute.For <ThriftHive.Iface>();

            var table = HiveQueryFactory.Queryable <StarWarsTable>(client).Where(x => x.Age > 25);

            var query = table.GetQueryData();

            Assert.AreEqual("select x.* from jjchiw_star_wars x where (x.Age > 25)", query);
        }
Example #2
0
        public void when_simple_query_get_when_clause_and_select_clause_anonymous()
        {
            var client = Substitute.For <ThriftHive.Iface>();

            var table = HiveQueryFactory.Queryable <StarWarsTable>(client).Where(x => x.Age > 25).Select(x => new { Name = x.Name, Age = x.Age });

            var query = table.GetQueryData();

            Assert.AreEqual("select x.Name, x.Age from jjchiw_star_wars x where (x.Age > 25)", query);
        }
Example #3
0
        public void when_simple_query_get_all()
        {
            var client = Substitute.For <ThriftHive.Iface>();

            var table = HiveQueryFactory.Queryable <StarWarsTable>(client);

            var query = table.GetQueryData();

            Assert.AreEqual("select items_0.* from jjchiw_star_wars items_0", query);
        }