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); }
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); }
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); }