BigMemory Go 4.3.2 | Product Documentation | BigMemory Go Developer Guide | Searching a Cache | Options for Working with Nulls
 
Options for Working with Nulls
The Search API supports using the presence of a null as search criteria.
myQuery.addCriteria(cache.getAttribute("middle_name").isNull());
It also supports using the absence of a null as search criteria:
myQuery.addCriteria(cache.getAttribute("middle_name").notNull());
Which is equivalent to:
myQuery.addCriteria(cache.getAttribute("middle_name").isNull().not());
BigMemory SQL also supports using the presence or absence of null as search criteria:
select * from searchable where birthDate is null
select * from searchable where birthDate is not null
Alternatively, you can call constructors to set up equivalent logic:
Criteria isNull = new IsNull("middle_name");
Criteria notNull = new NotNull("middle_name");

Copyright © 2010 - 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release