SUPAttributeTest

An SUPAttributeTest defines a filter condition using an MBO attribute, and supports multiple conditions.

For example, the Objective-C code shown below is equivalent to this SQL query:
SELECT * from A where id in [1,2,3]
SUPQuery *query = [SUPQuery getInstance];
SUPAttributeTest *test = [SUPAttributeTest getInstance];
test.attribute = @"id";
SUPObjectList *v = [SUPObjectList getInstance];
[v add:@"1"];
[v add:@"2"];
[v add:@"3"];
test.testValue = v;
test.operator = SUPAttributeTest_IN;
    
[query where:test];
When using EXISTS and NOT_EXISTS, the attribute name is not required in the AttributeTest. The query can reference an attribute value via its alias in the outer scope. The Objective-C code shown below is equivalent to this SQL query:
SELECT a.id from AllType a where exists (select b.id from AllType b where b.id = a.id)