function getFilteredCustomers() { var john = Customer.name.equal('John'); var yoko = Customer.name.equal('Yoko'); var filter = rdb.filter.or(john).or(yoko); //alternatively rdb.filter.and(john).or(yoko); return Customer.getMany(filter); }
function getFilteredCustomers() { var isActive = Customer.isActive.equal(true); var highBalance = Customer.balance.greaterThan(8000); var filter = rdb.filter.and(isActive).and(highBalance); //alternatively rdb.filter.or(isActive).and(highBalance); return Customer.getMany(filter); }