ColdMVC has the following operators that can be used with the findBy(), findAllBy(), findWhere(), findAllWhere(), countBy(), countWhere(), and createQuery() methods on your models.
Examples:
_Book.findByTitleLike("Da Vinci Code");
_Book.findAllByTitleLike("Da Vinci Code");
_Book.countByTitleLike("Da Vinci Code");
_Book.findWhere({
title = [ "like", "Da Vinci Code" ]
});
_Book.findAllWhere({
title = [ "like", "Da Vinci Code" ]
});
_Book.countWhere({
title = [ "like", "Da Vinci Code" ]
});
In addition, the following operators are aliased when working with createQuery() for shorter method names.
Examples:
var q = _Book.createQuery();
q.where(
q.eq("author", "Dan Brown"),
q.like("title", "Da Vinci Code")
);
var books = q.list();