use of com.amplifyframework.datastore.storage.sqlite.adapter.SQLPredicate in project amplify-android by aws-amplify.
the class SQLPredicateTest method testContainsForStringList.
/**
* Test contains in the context of a list.
* @throws DataStoreException Not thrown.
*/
@Test
public void testContainsForStringList() throws DataStoreException {
QueryPredicateOperation<String> predicate = Blog.TAGS.contains("something");
SQLPredicate sqlPredicate = new SQLPredicate(predicate);
validateSQLExpressionForContains(sqlPredicate, "tags");
}
use of com.amplifyframework.datastore.storage.sqlite.adapter.SQLPredicate in project amplify-android by aws-amplify.
the class SQLPredicateTest method testIsNull.
/**
* Test IS NULL expression.
* @throws DataStoreException Not thrown.
*/
@Test
public void testIsNull() throws DataStoreException {
SQLPredicate sqlPredicate = new SQLPredicate(Where.matches(Blog.NAME.eq(null)).getQueryPredicate());
System.out.println(sqlPredicate.toString());
assertEquals("name IS NULL", sqlPredicate.toString());
}
Aggregations