public virtual void TestWherePrototypeFieldIsPrimitiveInt() { StoreAll(OccamAndZora()); IteratorAssert.SameContent(Occam(), Db().From(typeof(Cat)).Where (((Cat)QLinSupport.P(typeof(Cat))).age).Equal (7).Select()); }
public virtual void TestWherePrototypeFieldIsString() { StoreAll(OccamAndZora()); IteratorAssert.SameContent(Occam(), Db().From(typeof(Cat)).Where (((Cat)QLinSupport.P(typeof(Cat))).Name()).Equal ("Occam").Select()); }
public virtual void TestWherePrototypeFieldStartsWith() { StoreAll(OccamAndZora()); IteratorAssert.SameContent(Occam(), Db().From(typeof(BasicQLinTestCase.Cat)).Where (((BasicQLinTestCase.Cat)QLinSupport.P(typeof(BasicQLinTestCase.Cat))).Name()).StartsWith ("Occ").Select()); }
public virtual void TestWherePrototypeFieldIsSmaller() { StoreAll(OccamAndZora()); IteratorAssert.SameContent(Zora(), Db().From(typeof(BasicQLinTestCase.Cat)).Where (((BasicQLinTestCase.Cat)QLinSupport.P(typeof(BasicQLinTestCase.Cat))).age).Smaller (7).Select()); }
public virtual void TestPredefinedPrototype() { StoreAll(OccamAndZora()); BasicQLinTestCase.Cat cat = ((BasicQLinTestCase.Cat)QLinSupport.Prototype(typeof( BasicQLinTestCase.Cat))); IteratorAssert.SameContent(Occam(), Db().From(typeof(BasicQLinTestCase.Cat)).Where (cat.Name()).StartsWith("Occ").Select()); }
public virtual void TestQueryingByInterface() { StoreAll(OccamAndIsetta()); BasicQLinTestCase.Dog dog = ((BasicQLinTestCase.Dog)QLinSupport.Prototype(typeof( BasicQLinTestCase.Dog))); BasicQLinTestCase.Cat cat = ((BasicQLinTestCase.Cat)QLinSupport.Prototype(typeof( BasicQLinTestCase.Cat))); AssertQuery(Isetta(), dog, "Isetta"); AssertQuery(Occam(), cat, "Occam"); }
public virtual void ClosureSample() { // List<Cat> occamAndZora = occamAndZora(); BasicQLinTestCase.Cat cat = ((BasicQLinTestCase.Cat)QLinSupport.Prototype(typeof( BasicQLinTestCase.Cat))); IList cats = ListOf(new BasicQLinTestCase.Cat[] { new BasicQLinTestCase.Cat("Zora" ), new BasicQLinTestCase.Cat("Wolke") }); With(cats, new _Closure_31(cat)); }
public virtual void TestQueryingByInterface() { StoreAll(OccamAndIsetta()); var dog = ((Dog)QLinSupport.Prototype(typeof( Dog))); var cat = ((Cat)QLinSupport.Prototype(typeof( Cat))); AssertQuery(Isetta(), dog, "Isetta"); AssertQuery(Occam(), cat, "Occam"); }
// IteratorAssert.sameContent(occam(), // db().from(Cat.class) // .where(cat.name().equals("Occam")) // .select()); public virtual void TestUpdate() { StoreAll(OccamZoraAchatAcrobat()); var newAge = 2; var cat = ((Cat)QLinSupport.Prototype(typeof( Cat))); // db().from(Cat.class) // .where(cat.father()).equal("Occam") // .update(cat.age(newAge)); var updated = Db().From(typeof(Cat)).Where(cat.Name()).Equal ("Occam").Select(); var i = updated.GetEnumerator(); }
public QLinOrderBy(QLinRoot root, object expression, QLinOrderByDirection direction ) : base(root) { _node = root.Descend(expression); if (direction == QLinSupport.Ascending()) { _node.OrderAscending(); } else { _node.OrderDescending(); } }
public virtual void ClosureSample() { // List<Cat> occamAndZora = occamAndZora(); var cat = ((Cat)QLinSupport.Prototype(typeof( Cat))); var cats = ListOf(new[] { new Cat("Zora" ), new Cat("Wolke") }); With(cats, new _Closure_31(cat)); }
public virtual void TestWhereAsNativeQuery() { StoreAll(OccamAndZora()); BasicQLinTestCase.Cat cat = ((BasicQLinTestCase.Cat)QLinSupport.Prototype(typeof( BasicQLinTestCase.Cat))); }
internal virtual IQuery Descend(object expression) { // TODO: Implement deep descend return(Query().Descend(QLinSupport.Field(expression).GetName())); }
public QLinRoot(IQuery query, Type clazz) { _query = (QQuery)query; query.Constrain(clazz); QLinSupport.Context(clazz); }
public virtual void TestField() { StoreAll(OccamAndZora()); IteratorAssert.SameContent(Occam(), Db().From(typeof(BasicQLinTestCase.Cat)).Where (QLinSupport.Field("name")).Equal("Occam").Select()); }
// while(i.hasNext()){ // Assert.areEqual(newAge, i.next().age()); // } public virtual void TestExecute() { StoreAll(OccamZoraAchatAcrobat()); var cat = ((Cat)QLinSupport.Prototype(typeof( Cat))); }
// while(i.hasNext()){ // Assert.areEqual(newAge, i.next().age()); // } public virtual void TestExecute() { StoreAll(OccamZoraAchatAcrobat()); BasicQLinTestCase.Cat cat = ((BasicQLinTestCase.Cat)QLinSupport.Prototype(typeof( BasicQLinTestCase.Cat))); }
public virtual void TestWhereAsNativeQuery() { StoreAll(OccamAndZora()); var cat = ((Cat)QLinSupport.Prototype(typeof( Cat))); }