Where

Daobab provides all three kinds of where clause:
and - AND()
or - OR()
not - NOT()

Default operator is EQ:

Select.one(db,tabPizza).where(tabPizza.colPizzaId(),4);

Use Operator enum in case of change:

Select.from(db,tabPizza).where(tabPizza.colPizzaId(),GT,4);

There is a lot of 'where' methods to choose:

Select.from(db,tabPizza).where(tabPizza.colName(),IN,"CAPRICIOSA","PEPPERONI").result();

SQL structure prevents commiting a logical error:

Select.from(db,tabPizza).where(AND()
	.and(tabPizza.colPizzaId(),4)
	.and(tabPizza.colName(),"CAPRICIOSA"))
.result();

AND together with OR:

Select.from(db,tabPizza)
  .where(OR()
  .or(AND()
    .and(tabPizza.colPizzaId(),4)
    .and(tabPizza.colName(),"CAPRICIOSA"))
  .or(AND()
    .and(tabPizza.colPizzaId(),1)
    .and(tabPizza.colName(),"MARHGETITA")))
  .result();

Where can be used in all kinds of queries:

Delete.from(db,tabPizza)
  .where(OR()
  .or(AND()
	.and(tabPizza.colPizzaId(),4)
	.and(tabPizza.colName(),"CAPRICIOSA"))
  .or(AND()
	.and(tabPizza.colPizzaId(),1)
	.and(tabPizza.colName(),"MARHGETITA")))
  .execute();

Where usage into Joins

//Select pizza name and price from orders at specified phone with price greater than 20
Select.from(db,tabPizza.colName(),tabOrderPizza.colPrice())
  .join(tabOrderPizza,tabPizza.colPizzaId,AND().and(tabOrdePizza.colPrice(),GT,20)
  .join(tabCustomer,tabOrderPizza.colCustomerId(),AND().and(tabCustomer.colPhone,"888580087")
.result();